Changeset 694 for Daodan


Ignore:
Timestamp:
Mar 8, 2013, 1:31:30 AM (12 years ago)
Author:
alloc
Message:

Daodan: Fixed gamma ramp thing

Location:
Daodan/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • Daodan/src/BFW_Motoko_Draw.h

    r692 r694  
    6969} M3tDrawPtrState;
    7070
     71typedef struct
     72{
     73        WORD data[3][256];
     74} M3tWin32GammaRamp;
     75
    7176extern char M3gResolutionSwitch;
    7277
  • Daodan/src/Daodan.c

    r693 r694  
    255255        if(patch_chinese)
    256256        {
     257                DDrStartupMessage("Loading chinese DLL");
    257258                HMODULE dll = LoadLibrary("xfhsm_oni.dll");
     259                DWORD err = GetLastError();
     260                DDrStartupMessage(" - Module loading returned error %i", err);
    258261                if( dll )
    259262                {
  • Daodan/src/Daodan_GL.c

    r692 r694  
    237237                DDrStartupMessage("Using standard Windows gamma adjustment");
    238238
    239 //WINE CRASH!           if (GetDeviceGammaRamp(gl_eng->HDC, gl_gamma_ramp))
     239                if (GetDeviceGammaRamp(gl_eng->HDC, gl_gamma_ramp))
    240240                        gl_gamma_ramp_valid = 1;
    241241        }
  • Daodan/src/Oni_GL.h

    r692 r694  
    435435        GLboolean (WINAPI *wglSwapIntervalEXT)(GLint interval);
    436436
    437         GLint (WINAPI *wglSetDeviceGammaRamp3DFX)(HDC, GLvoid *);
    438         GLint (WINAPI *wglGetDeviceGammaRamp3DFX)(HDC, GLvoid *);
     437        GLint (WINAPI *wglSetDeviceGammaRamp3DFX)(HDC, M3tWin32GammaRamp*);
     438        GLint (WINAPI *wglGetDeviceGammaRamp3DFX)(HDC, M3tWin32GammaRamp*);
    439439} gl_api_t;
    440440
  • Daodan/src/Oni_Symbols.h

    r693 r694  
    3636
    3737// OpenGL Gamma related
    38 #define gl_gamma_ramp           (*((WORD**)0x0055fdfc))
     38#define gl_gamma_ramp           (((M3tWin32GammaRamp*)0x0055fdfc))
    3939
    4040// OpenGL Gamma related
Note: See TracChangeset for help on using the changeset viewer.