|
@@ -2236,7 +2236,7 @@ int Cocoa_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp)
|
|
|
{
|
|
{
|
|
|
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
|
|
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
|
|
|
CGDirectDisplayID display_id = ((SDL_DisplayData *)display->driverdata)->display;
|
|
CGDirectDisplayID display_id = ((SDL_DisplayData *)display->driverdata)->display;
|
|
|
- const uint32_t tableSize = 256;
|
|
|
|
|
|
|
+ #define tableSize 256
|
|
|
CGGammaValue redTable[tableSize];
|
|
CGGammaValue redTable[tableSize];
|
|
|
CGGammaValue greenTable[tableSize];
|
|
CGGammaValue greenTable[tableSize];
|
|
|
CGGammaValue blueTable[tableSize];
|
|
CGGammaValue blueTable[tableSize];
|
|
@@ -2255,6 +2255,7 @@ int Cocoa_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp)
|
|
|
return SDL_SetError("CGSetDisplayTransferByTable()");
|
|
return SDL_SetError("CGSetDisplayTransferByTable()");
|
|
|
}
|
|
}
|
|
|
return 0;
|
|
return 0;
|
|
|
|
|
+ #undef tableSize
|
|
|
}}
|
|
}}
|
|
|
|
|
|
|
|
void *Cocoa_GetWindowICCProfile(_THIS, SDL_Window * window, size_t * size)
|
|
void *Cocoa_GetWindowICCProfile(_THIS, SDL_Window * window, size_t * size)
|
|
@@ -2335,7 +2336,7 @@ int Cocoa_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp)
|
|
|
{
|
|
{
|
|
|
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
|
|
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
|
|
|
CGDirectDisplayID display_id = ((SDL_DisplayData *)display->driverdata)->display;
|
|
CGDirectDisplayID display_id = ((SDL_DisplayData *)display->driverdata)->display;
|
|
|
- const uint32_t tableSize = 256;
|
|
|
|
|
|
|
+ #define tableSize 256
|
|
|
CGGammaValue redTable[tableSize];
|
|
CGGammaValue redTable[tableSize];
|
|
|
CGGammaValue greenTable[tableSize];
|
|
CGGammaValue greenTable[tableSize];
|
|
|
CGGammaValue blueTable[tableSize];
|
|
CGGammaValue blueTable[tableSize];
|
|
@@ -2352,6 +2353,7 @@ int Cocoa_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp)
|
|
|
ramp[2*256+i] = (Uint16)(blueTable[i] * 65535.0f);
|
|
ramp[2*256+i] = (Uint16)(blueTable[i] * 65535.0f);
|
|
|
}
|
|
}
|
|
|
return 0;
|
|
return 0;
|
|
|
|
|
+ #undef tableSize
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void Cocoa_SetWindowMouseRect(_THIS, SDL_Window * window)
|
|
void Cocoa_SetWindowMouseRect(_THIS, SDL_Window * window)
|