mirror of
https://github.com/etlegacy/etlegacy-libs.git
synced 2025-02-24 12:11:11 +00:00
Build and runtime fixes for OS X
- Fixes a build issue when using the 10.9 SDK - Fixes a critical memory-smasher in the video gamma-setting function.
This commit is contained in:
parent
52a2a00dcf
commit
e72af88319
2 changed files with 5 additions and 1 deletions
|
@ -91,7 +91,11 @@ typedef struct SDL_PrivateVideoData {
|
||||||
CGDirectDisplayID display; /* 0 == main display (only support single display) */
|
CGDirectDisplayID display; /* 0 == main display (only support single display) */
|
||||||
const void *mode; /* current mode of the display */
|
const void *mode; /* current mode of the display */
|
||||||
const void *save_mode; /* original mode of the display */
|
const void *save_mode; /* original mode of the display */
|
||||||
|
|
||||||
|
#if (MAC_OS_X_VERSION_MIN_REQUIRED < 1070)
|
||||||
CGDirectPaletteRef palette; /* palette of an 8-bit display */
|
CGDirectPaletteRef palette; /* palette of an 8-bit display */
|
||||||
|
#endif
|
||||||
|
|
||||||
NSOpenGLContext *gl_context; /* OpenGL rendering context */
|
NSOpenGLContext *gl_context; /* OpenGL rendering context */
|
||||||
NSGraphicsContext *nsgfx_context; /* Cocoa graphics context */
|
NSGraphicsContext *nsgfx_context; /* Cocoa graphics context */
|
||||||
Uint32 width, height, bpp; /* frequently used data about the display */
|
Uint32 width, height, bpp; /* frequently used data about the display */
|
||||||
|
|
|
@ -1635,7 +1635,7 @@ int QZ_GetGamma (_THIS, float *red, float *green, float *blue)
|
||||||
|
|
||||||
int QZ_SetGammaRamp (_THIS, Uint16 *ramp)
|
int QZ_SetGammaRamp (_THIS, Uint16 *ramp)
|
||||||
{
|
{
|
||||||
const uint32_t tableSize = 255;
|
const uint32_t tableSize = 256;
|
||||||
CGGammaValue redTable[tableSize];
|
CGGammaValue redTable[tableSize];
|
||||||
CGGammaValue greenTable[tableSize];
|
CGGammaValue greenTable[tableSize];
|
||||||
CGGammaValue blueTable[tableSize];
|
CGGammaValue blueTable[tableSize];
|
||||||
|
|
Loading…
Reference in a new issue