Added missing guards in implementation for PSP.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Sat, 31 Jan 2015 22:45:54 +0100
changeset 9329 64bb8e49c6a6
parent 9328 b21d3417260a
child 9330 26eb20aad02f
Added missing guards in implementation for PSP. Thanks to Martin Gerhardy for pointing this out.
src/audio/psp/SDL_pspaudio.c
src/joystick/psp/SDL_sysjoystick.c
src/main/psp/SDL_psp_main.c
src/thread/psp/SDL_syscond.c
src/thread/psp/SDL_sysmutex.c
src/thread/psp/SDL_syssem.c
src/thread/psp/SDL_systhread.c
src/timer/psp/SDL_systimer.c
src/video/psp/SDL_pspevents.c
src/video/psp/SDL_pspgl.c
src/video/psp/SDL_pspmouse.c
--- a/src/audio/psp/SDL_pspaudio.c	Sat Jan 31 22:43:05 2015 +0100
+++ b/src/audio/psp/SDL_pspaudio.c	Sat Jan 31 22:45:54 2015 +0100
@@ -20,6 +20,8 @@
 */
 #include "../../SDL_internal.h"
 
+#if SDL_AUDIO_DRIVER_PSP
+
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
@@ -192,5 +194,6 @@
 
  /* SDL_AUDI */
 
+#endif /* SDL_AUDIO_DRIVER_PSP */
 
-
+/* vi: set ts=4 sw=4 expandtab: */
--- a/src/joystick/psp/SDL_sysjoystick.c	Sat Jan 31 22:43:05 2015 +0100
+++ b/src/joystick/psp/SDL_sysjoystick.c	Sat Jan 31 22:45:54 2015 +0100
@@ -20,6 +20,8 @@
 */
 #include "../../SDL_internal.h"
 
+#if SDL_JOYSTICK_PSP
+
 /* This is the PSP implementation of the SDL joystick API */
 #include <pspctrl.h>
 #include <pspkernel.h>
@@ -263,5 +265,7 @@
     return guid;
 }
 
+#endif /* SDL_JOYSTICK_PSP */
+
 /* vim: ts=4 sw=4
  */
--- a/src/main/psp/SDL_psp_main.c	Sat Jan 31 22:43:05 2015 +0100
+++ b/src/main/psp/SDL_psp_main.c	Sat Jan 31 22:45:54 2015 +0100
@@ -1,6 +1,9 @@
 /*
     SDL_psp_main.c, placed in the public domain by Sam Lantinga  3/13/14
 */
+#include "SDL_config.h"
+
+#ifdef __PSP__
 
 #include "SDL_main.h"
 #include <pspkernel.h>
@@ -61,3 +64,7 @@
     (void)SDL_main(argc, argv);
     return 0;
 }
+
+#endif /* __PSP__ */
+
+/* vi: set ts=4 sw=4 expandtab: */
--- a/src/thread/psp/SDL_syscond.c	Sat Jan 31 22:43:05 2015 +0100
+++ b/src/thread/psp/SDL_syscond.c	Sat Jan 31 22:45:54 2015 +0100
@@ -20,6 +20,8 @@
 */
 #include "../../SDL_internal.h"
 
+#if SDL_THREAD_PSP
+
 /* An implementation of condition variables using semaphores and mutexes */
 /*
    This implementation borrows heavily from the BeOS condition variable
@@ -217,4 +219,6 @@
     return SDL_CondWaitTimeout(cond, mutex, SDL_MUTEX_MAXWAIT);
 }
 
+#endif /* SDL_THREAD_PSP */
+
 /* vi: set ts=4 sw=4 expandtab: */
--- a/src/thread/psp/SDL_sysmutex.c	Sat Jan 31 22:43:05 2015 +0100
+++ b/src/thread/psp/SDL_sysmutex.c	Sat Jan 31 22:45:54 2015 +0100
@@ -20,6 +20,8 @@
 */
 #include "../../SDL_internal.h"
 
+#if SDL_THREAD_PSP
+
 /* An implementation of mutexes using semaphores */
 
 #include "SDL_thread.h"
@@ -129,4 +131,6 @@
 #endif /* SDL_THREADS_DISABLED */
 }
 
+#endif /* SDL_THREAD_PSP */
+
 /* vi: set ts=4 sw=4 expandtab: */
--- a/src/thread/psp/SDL_syssem.c	Sat Jan 31 22:43:05 2015 +0100
+++ b/src/thread/psp/SDL_syssem.c	Sat Jan 31 22:45:54 2015 +0100
@@ -20,6 +20,8 @@
 */
 #include "../../SDL_internal.h"
 
+#if SDL_THREAD_PSP
+
 /* Semaphore functions for the PSP. */
 
 #include <stdio.h>
@@ -153,5 +155,7 @@
     return 0;
 }
 
+#endif /* SDL_THREAD_PSP */
+
 /* vim: ts=4 sw=4
  */
--- a/src/thread/psp/SDL_systhread.c	Sat Jan 31 22:43:05 2015 +0100
+++ b/src/thread/psp/SDL_systhread.c	Sat Jan 31 22:45:54 2015 +0100
@@ -20,6 +20,8 @@
 */
 #include "../../SDL_internal.h"
 
+#if SDL_THREAD_PSP
+
 /* PSP thread management routines for SDL */
 
 #include <stdio.h>
@@ -104,5 +106,7 @@
 
 }
 
+#endif /* SDL_THREAD_PSP */
+
 /* vim: ts=4 sw=4
  */
--- a/src/timer/psp/SDL_systimer.c	Sat Jan 31 22:43:05 2015 +0100
+++ b/src/timer/psp/SDL_systimer.c	Sat Jan 31 22:45:54 2015 +0100
@@ -20,6 +20,8 @@
 */
 #include "../../SDL_internal.h"
 
+#ifdef SDL_TIMERS_PSP
+
 #include "SDL_thread.h"
 #include "SDL_timer.h"
 #include "SDL_error.h"
@@ -83,5 +85,7 @@
     sceKernelDelayThreadCB(ms * 1000);
 }
 
+#endif /* SDL_TIMERS_PSP */
+
 /* vim: ts=4 sw=4
  */
--- a/src/video/psp/SDL_pspevents.c	Sat Jan 31 22:43:05 2015 +0100
+++ b/src/video/psp/SDL_pspevents.c	Sat Jan 31 22:45:54 2015 +0100
@@ -20,6 +20,8 @@
 */
 #include "../../SDL_internal.h"
 
+#if SDL_VIDEO_DRIVER_PSP
+
 /* Being a null driver, there's no event stream. We just define stubs for
    most of the API. */
 
@@ -283,3 +285,6 @@
 
 /* end of SDL_pspevents.c ... */
 
+#endif /* SDL_VIDEO_DRIVER_PSP */
+
+/* vi: set ts=4 sw=4 expandtab: */
--- a/src/video/psp/SDL_pspgl.c	Sat Jan 31 22:43:05 2015 +0100
+++ b/src/video/psp/SDL_pspgl.c	Sat Jan 31 22:45:54 2015 +0100
@@ -20,6 +20,8 @@
 */
 #include "../../SDL_internal.h"
 
+#if SDL_VIDEO_DRIVER_PSP
+
 #include <stdlib.h>
 #include <string.h>
 
@@ -204,3 +206,6 @@
     return;
 }
 
+#endif /* SDL_VIDEO_DRIVER_PSP */
+
+/* vi: set ts=4 sw=4 expandtab: */
--- a/src/video/psp/SDL_pspmouse.c	Sat Jan 31 22:43:05 2015 +0100
+++ b/src/video/psp/SDL_pspmouse.c	Sat Jan 31 22:45:54 2015 +0100
@@ -20,6 +20,7 @@
 */
 #include "../../SDL_internal.h"
 
+#if SDL_VIDEO_DRIVER_PSP
 
 #include <stdio.h>
 
@@ -34,3 +35,7 @@
 struct WMcursor {
     int unused;
 };
+
+#endif /* SDL_VIDEO_DRIVER_PSP */
+
+/* vi: set ts=4 sw=4 expandtab: */