Index: Daodan/src/BFW_Motoko_Draw.h
===================================================================
--- Daodan/src/BFW_Motoko_Draw.h	(revision 693)
+++ Daodan/src/BFW_Motoko_Draw.h	(revision 694)
@@ -69,4 +69,9 @@
 } M3tDrawPtrState;
 
+typedef struct
+{
+	WORD data[3][256];
+} M3tWin32GammaRamp;
+
 extern char M3gResolutionSwitch;
 
Index: Daodan/src/Daodan.c
===================================================================
--- Daodan/src/Daodan.c	(revision 693)
+++ Daodan/src/Daodan.c	(revision 694)
@@ -255,5 +255,8 @@
 	if(patch_chinese)
 	{
+		DDrStartupMessage("Loading chinese DLL");
 		HMODULE dll = LoadLibrary("xfhsm_oni.dll");
+		DWORD err = GetLastError();
+		DDrStartupMessage(" - Module loading returned error %i", err);
 		if( dll )
 		{
Index: Daodan/src/Daodan_GL.c
===================================================================
--- Daodan/src/Daodan_GL.c	(revision 693)
+++ Daodan/src/Daodan_GL.c	(revision 694)
@@ -237,5 +237,5 @@
 		DDrStartupMessage("Using standard Windows gamma adjustment");
 
-//WINE CRASH!		if (GetDeviceGammaRamp(gl_eng->HDC, gl_gamma_ramp))
+		if (GetDeviceGammaRamp(gl_eng->HDC, gl_gamma_ramp))
 			gl_gamma_ramp_valid = 1;
 	}
Index: Daodan/src/Oni_GL.h
===================================================================
--- Daodan/src/Oni_GL.h	(revision 693)
+++ Daodan/src/Oni_GL.h	(revision 694)
@@ -435,6 +435,6 @@
 	GLboolean (WINAPI *wglSwapIntervalEXT)(GLint interval);
 
-	GLint (WINAPI *wglSetDeviceGammaRamp3DFX)(HDC, GLvoid *);
-	GLint (WINAPI *wglGetDeviceGammaRamp3DFX)(HDC, GLvoid *);
+	GLint (WINAPI *wglSetDeviceGammaRamp3DFX)(HDC, M3tWin32GammaRamp*);
+	GLint (WINAPI *wglGetDeviceGammaRamp3DFX)(HDC, M3tWin32GammaRamp*);
 } gl_api_t;
 
Index: Daodan/src/Oni_Symbols.h
===================================================================
--- Daodan/src/Oni_Symbols.h	(revision 693)
+++ Daodan/src/Oni_Symbols.h	(revision 694)
@@ -36,5 +36,5 @@
 
 // OpenGL Gamma related
-#define gl_gamma_ramp		(*((WORD**)0x0055fdfc))
+#define gl_gamma_ramp		(((M3tWin32GammaRamp*)0x0055fdfc))
 
 // OpenGL Gamma related
