Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fixed some minor compiler warnings.

  • Loading branch information
icculus committed Jul 20, 2012
1 parent 524d1ea commit 583d19f5f49fcd9d179a4906893edf33d82de065
Showing with 29 additions and 16 deletions.
  1. +11 −12 src/file/SDL_rwops.c
  2. +2 −1 src/render/software/SDL_rotate.h
  3. +2 −0 src/video/x11/SDL_x11opengl.c
  4. +14 −3 src/video/x11/SDL_x11xinput2.c
@@ -438,9 +438,6 @@ SDL_RWops *
SDL_RWFromFile(const char *file, const char *mode)
{
SDL_RWops *rwops = NULL;
#ifdef HAVE_STDIO_H
FILE *fp = NULL;
#endif
if (!file || !*file || !mode || !*mode) {
SDL_SetError("SDL_RWFromFile(): No file or no mode specified");
return NULL;
@@ -472,15 +469,17 @@ SDL_RWFromFile(const char *file, const char *mode)
rwops->close = windows_file_close;

#elif HAVE_STDIO_H
#ifdef __APPLE__
fp = SDL_OpenFPFromBundleOrFallback(file, mode);
#else
fp = fopen(file, mode);
#endif
if (fp == NULL) {
SDL_SetError("Couldn't open %s", file);
} else {
rwops = SDL_RWFromFP(fp, 1);
{
#ifdef __APPLE__
FILE *fp = SDL_OpenFPFromBundleOrFallback(file, mode);
#else
FILE *fp = fopen(file, mode);
#endif
if (fp == NULL) {
SDL_SetError("Couldn't open %s", file);
} else {
rwops = SDL_RWFromFP(fp, 1);
}
}
#else
SDL_SetError("SDL not compiled with stdio support");
@@ -3,4 +3,5 @@
#endif

extern SDL_Surface *_rotateSurface(SDL_Surface * src, double angle, int centerx, int centery, int smooth, int flipx, int flipy, int dstwidth, int dstheight, double cangle, double sangle);
extern void _rotozoomSurfaceSizeTrig(int width, int height, double angle, int *dstwidth, int *dstheight, double *cangle, double *sangle);
extern void _rotozoomSurfaceSizeTrig(int width, int height, double angle, int *dstwidth, int *dstheight, double *cangle, double *sangle);

@@ -95,8 +95,10 @@ typedef GLXContext(*PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display * dpy,

#ifndef GLX_EXT_create_context_es2_profile
#define GLX_EXT_create_context_es2_profile
#ifndef GLX_CONTEXT_ES2_PROFILE_BIT_EXT
#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000002
#endif
#endif

#ifndef GLX_EXT_swap_control
#define GLX_SWAP_INTERVAL_EXT 0x20F1
@@ -29,16 +29,19 @@

#define MAX_AXIS 16

#if SDL_VIDEO_DRIVER_X11_XINPUT2
static int xinput2_initialized = 0;

#if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
static int xinput2_multitouch_supported = 0;
/* Opcode returned XQueryExtension
#endif

/* Opcode returned XQueryExtension
* It will be used in event processing
* to know that the event came from
* this extension */
static int xinput2_opcode;


#if SDL_VIDEO_DRIVER_X11_XINPUT2
static void parse_valuators(const double *input_values,unsigned char *mask,int mask_len,
double *output_values,int output_values_len) {
int i = 0,z = 0;
@@ -237,12 +240,20 @@ X11_Xinput2SelectTouch(_THIS, SDL_Window *window) {

int
X11_Xinput2IsInitialized() {
#if SDL_VIDEO_DRIVER_X11_XINPUT2
return xinput2_initialized;
#else
return 0;
#endif
}

int
X11_Xinput2IsMutitouchSupported() {
#if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
return xinput2_initialized && xinput2_multitouch_supported;
#else
return 0;
#endif
}

#endif /* SDL_VIDEO_DRIVER_X11 */

0 comments on commit 583d19f

Please sign in to comment.