mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-07-08 18:29:43 +00:00
SDL_cocoawindow.m: work-around build error due to -Wgnu-folding-constant
This commit is contained in:
@@ -2236,7 +2236,7 @@ int Cocoa_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp)
|
||||
{
|
||||
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
|
||||
CGDirectDisplayID display_id = ((SDL_DisplayData *)display->driverdata)->display;
|
||||
const uint32_t tableSize = 256;
|
||||
#define tableSize 256
|
||||
CGGammaValue redTable[tableSize];
|
||||
CGGammaValue greenTable[tableSize];
|
||||
CGGammaValue blueTable[tableSize];
|
||||
@@ -2255,6 +2255,7 @@ int Cocoa_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp)
|
||||
return SDL_SetError("CGSetDisplayTransferByTable()");
|
||||
}
|
||||
return 0;
|
||||
#undef tableSize
|
||||
}}
|
||||
|
||||
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);
|
||||
CGDirectDisplayID display_id = ((SDL_DisplayData *)display->driverdata)->display;
|
||||
const uint32_t tableSize = 256;
|
||||
#define tableSize 256
|
||||
CGGammaValue redTable[tableSize];
|
||||
CGGammaValue greenTable[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);
|
||||
}
|
||||
return 0;
|
||||
#undef tableSize
|
||||
}
|
||||
|
||||
void Cocoa_SetWindowMouseRect(_THIS, SDL_Window * window)
|
||||
|
||||
Reference in New Issue
Block a user