SDL_cocoawindow.m: work-around build error due to -Wgnu-folding-constant

This commit is contained in:
Ozkan Sezer
2026-07-05 04:51:10 +03:00
parent bc518123c7
commit de433838ad

View File

@@ -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)