termux-packages/x11-packages/sdl/SDL-1.2.15_src_video_SDL_gamma.c.patch
Leonid Pliushch b979e0f6ba
sdl: enable pthreads
Fixes issues when creating audio thread.
2022-04-18 14:08:33 +05:30

29 lines
894 B
Diff

diff -uNr SDL-1.2.15/src/video/SDL_gamma.c SDL-1.2.15.mod/src/video/SDL_gamma.c
--- SDL-1.2.15/src/video/SDL_gamma.c 2012-01-19 08:30:06.000000000 +0200
+++ SDL-1.2.15.mod/src/video/SDL_gamma.c 2018-10-26 23:20:45.222057960 +0300
@@ -92,22 +92,11 @@
int SDL_SetGamma(float red, float green, float blue)
{
- int succeeded;
+ int succeeded = -1;
SDL_VideoDevice *video = current_video;
SDL_VideoDevice *this = current_video;
- succeeded = -1;
- /* Prefer using SetGammaRamp(), as it's more flexible */
- {
- Uint16 ramp[3][256];
-
- CalculateGammaRamp(red, ramp[0]);
- CalculateGammaRamp(green, ramp[1]);
- CalculateGammaRamp(blue, ramp[2]);
- succeeded = SDL_SetGammaRamp(ramp[0], ramp[1], ramp[2]);
- }
- if ( (succeeded < 0) && video->SetGamma ) {
- SDL_ClearError();
+ if ( video->SetGamma ) {
succeeded = video->SetGamma(this, red, green, blue);
}
return succeeded;