summaryrefslogtreecommitdiff
path: root/apps/plugins/sdl/src/video/SDL_gamma.c
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-04-04 20:24:33 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-04-11 19:29:47 +0200
commite28d1fe91671f64ce30d6e439787a48d71de5616 (patch)
treef787aaac6e894abf7e3f4144cd1b827e65db673d /apps/plugins/sdl/src/video/SDL_gamma.c
parent2ad6c3438e53ddaa80c0aa43e995376495ce1a77 (diff)
downloadrockbox-e28d1fe91671f64ce30d6e439787a48d71de5616.tar.gz
rockbox-e28d1fe91671f64ce30d6e439787a48d71de5616.zip
SDL: Silence a large number of compile warnings (WIP)
There are some real bugs in here, but we're drowning in warnings. Change-Id: I7c2c0eafc8426327521bdd8a3ac2d3742ac16864
Diffstat (limited to 'apps/plugins/sdl/src/video/SDL_gamma.c')
-rw-r--r--apps/plugins/sdl/src/video/SDL_gamma.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/plugins/sdl/src/video/SDL_gamma.c b/apps/plugins/sdl/src/video/SDL_gamma.c
index 4fd037019f..c820620b5c 100644
--- a/apps/plugins/sdl/src/video/SDL_gamma.c
+++ b/apps/plugins/sdl/src/video/SDL_gamma.c
@@ -29,10 +29,10 @@
29/* Math routines from uClibc: http://www.uclibc.org */ 29/* Math routines from uClibc: http://www.uclibc.org */
30#include "math_private.h" 30#include "math_private.h"
31#include "e_sqrt.h" 31#include "e_sqrt.h"
32#include "e_pow.h" 32//#include "e_pow.h"
33#include "e_log.h" 33//#include "e_log.h"
34#define pow(x, y) __ieee754_pow(x, y) 34//#define pow(x, y) __ieee754_pow(x, y)
35#define log(x) __ieee754_log(x) 35//#define log(x) __ieee754_log(x)
36#endif 36#endif
37 37
38#include "SDL_sysvideo.h" 38#include "SDL_sysvideo.h"
@@ -94,7 +94,7 @@ int SDL_SetGamma(float red, float green, float blue)
94{ 94{
95 int succeeded; 95 int succeeded;
96 SDL_VideoDevice *video = current_video; 96 SDL_VideoDevice *video = current_video;
97 SDL_VideoDevice *this = current_video; 97 SDL_VideoDevice *this = current_video;
98 98
99 succeeded = -1; 99 succeeded = -1;
100 /* Prefer using SetGammaRamp(), as it's more flexible */ 100 /* Prefer using SetGammaRamp(), as it's more flexible */
@@ -120,7 +120,7 @@ int SDL_GetGamma(float *red, float *green, float *blue)
120{ 120{
121 int succeeded; 121 int succeeded;
122 SDL_VideoDevice *video = current_video; 122 SDL_VideoDevice *video = current_video;
123 SDL_VideoDevice *this = current_video; 123 SDL_VideoDevice *this = current_video;
124 124
125 succeeded = -1; 125 succeeded = -1;
126 /* Prefer using GetGammaRamp(), as it's more flexible */ 126 /* Prefer using GetGammaRamp(), as it's more flexible */
@@ -145,7 +145,7 @@ int SDL_SetGammaRamp(const Uint16 *red, const Uint16 *green, const Uint16 *blue)
145{ 145{
146 int succeeded; 146 int succeeded;
147 SDL_VideoDevice *video = current_video; 147 SDL_VideoDevice *video = current_video;
148 SDL_VideoDevice *this = current_video; 148 SDL_VideoDevice *this = current_video;
149 SDL_Surface *screen = SDL_PublicSurface; 149 SDL_Surface *screen = SDL_PublicSurface;
150 150
151 /* Verify the screen parameter */ 151 /* Verify the screen parameter */
@@ -177,7 +177,7 @@ int SDL_SetGammaRamp(const Uint16 *red, const Uint16 *green, const Uint16 *blue)
177 /* If physical palette has been set independently, use it */ 177 /* If physical palette has been set independently, use it */
178 if(video->physpal) 178 if(video->physpal)
179 pal = video->physpal; 179 pal = video->physpal;
180 180
181 SDL_SetPalette(screen, SDL_PHYSPAL, 181 SDL_SetPalette(screen, SDL_PHYSPAL,
182 pal->colors, 0, pal->ncolors); 182 pal->colors, 0, pal->ncolors);
183 return 0; 183 return 0;
@@ -196,7 +196,7 @@ int SDL_SetGammaRamp(const Uint16 *red, const Uint16 *green, const Uint16 *blue)
196int SDL_GetGammaRamp(Uint16 *red, Uint16 *green, Uint16 *blue) 196int SDL_GetGammaRamp(Uint16 *red, Uint16 *green, Uint16 *blue)
197{ 197{
198 SDL_VideoDevice *video = current_video; 198 SDL_VideoDevice *video = current_video;
199 SDL_VideoDevice *this = current_video; 199 SDL_VideoDevice *this = current_video;
200 200
201 /* Lazily allocate the gamma table */ 201 /* Lazily allocate the gamma table */
202 if ( ! video->gamma ) { 202 if ( ! video->gamma ) {