Skip to content

Commit

Permalink
Added missing guards in implementation for PSP.
Browse files Browse the repository at this point in the history
Thanks to Martin Gerhardy for pointing this out.
  • Loading branch information
philippwiesemann committed Jan 31, 2015
1 parent d036ad8 commit 86f87bf
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/audio/psp/SDL_pspaudio.c
Expand Up @@ -20,6 +20,8 @@
*/
#include "../../SDL_internal.h"

#if SDL_AUDIO_DRIVER_PSP

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
Expand Down Expand Up @@ -192,5 +194,6 @@ AudioBootStrap PSPAUD_bootstrap = {

/* SDL_AUDI */

#endif /* SDL_AUDIO_DRIVER_PSP */


/* vi: set ts=4 sw=4 expandtab: */
4 changes: 4 additions & 0 deletions src/joystick/psp/SDL_sysjoystick.c
Expand Up @@ -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>
Expand Down Expand Up @@ -263,5 +265,7 @@ SDL_JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick)
return guid;
}

#endif /* SDL_JOYSTICK_PSP */

/* vim: ts=4 sw=4
*/
7 changes: 7 additions & 0 deletions src/main/psp/SDL_psp_main.c
@@ -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>
Expand Down Expand Up @@ -61,3 +64,7 @@ int main(int argc, char *argv[])
(void)SDL_main(argc, argv);
return 0;
}

#endif /* __PSP__ */

/* vi: set ts=4 sw=4 expandtab: */
4 changes: 4 additions & 0 deletions src/thread/psp/SDL_syscond.c
Expand Up @@ -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
Expand Down Expand Up @@ -217,4 +219,6 @@ SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex)
return SDL_CondWaitTimeout(cond, mutex, SDL_MUTEX_MAXWAIT);
}

#endif /* SDL_THREAD_PSP */

/* vi: set ts=4 sw=4 expandtab: */
4 changes: 4 additions & 0 deletions src/thread/psp/SDL_sysmutex.c
Expand Up @@ -20,6 +20,8 @@
*/
#include "../../SDL_internal.h"

#if SDL_THREAD_PSP

/* An implementation of mutexes using semaphores */

#include "SDL_thread.h"
Expand Down Expand Up @@ -129,4 +131,6 @@ SDL_mutexV(SDL_mutex * mutex)
#endif /* SDL_THREADS_DISABLED */
}

#endif /* SDL_THREAD_PSP */

/* vi: set ts=4 sw=4 expandtab: */
4 changes: 4 additions & 0 deletions src/thread/psp/SDL_syssem.c
Expand Up @@ -20,6 +20,8 @@
*/
#include "../../SDL_internal.h"

#if SDL_THREAD_PSP

/* Semaphore functions for the PSP. */

#include <stdio.h>
Expand Down Expand Up @@ -153,5 +155,7 @@ int SDL_SemPost(SDL_sem *sem)
return 0;
}

#endif /* SDL_THREAD_PSP */

/* vim: ts=4 sw=4
*/
4 changes: 4 additions & 0 deletions src/thread/psp/SDL_systhread.c
Expand Up @@ -20,6 +20,8 @@
*/
#include "../../SDL_internal.h"

#if SDL_THREAD_PSP

/* PSP thread management routines for SDL */

#include <stdio.h>
Expand Down Expand Up @@ -104,5 +106,7 @@ int SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority)

}

#endif /* SDL_THREAD_PSP */

/* vim: ts=4 sw=4
*/
4 changes: 4 additions & 0 deletions src/timer/psp/SDL_systimer.c
Expand Up @@ -20,6 +20,8 @@
*/
#include "../../SDL_internal.h"

#ifdef SDL_TIMERS_PSP

#include "SDL_thread.h"
#include "SDL_timer.h"
#include "SDL_error.h"
Expand Down Expand Up @@ -83,5 +85,7 @@ void SDL_Delay(Uint32 ms)
sceKernelDelayThreadCB(ms * 1000);
}

#endif /* SDL_TIMERS_PSP */

/* vim: ts=4 sw=4
*/
5 changes: 5 additions & 0 deletions src/video/psp/SDL_pspevents.c
Expand Up @@ -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. */

Expand Down Expand Up @@ -283,3 +285,6 @@ void PSP_EventQuit(_THIS)

/* end of SDL_pspevents.c ... */

#endif /* SDL_VIDEO_DRIVER_PSP */

/* vi: set ts=4 sw=4 expandtab: */
5 changes: 5 additions & 0 deletions src/video/psp/SDL_pspgl.c
Expand Up @@ -20,6 +20,8 @@
*/
#include "../../SDL_internal.h"

#if SDL_VIDEO_DRIVER_PSP

#include <stdlib.h>
#include <string.h>

Expand Down Expand Up @@ -204,3 +206,6 @@ PSP_GL_DeleteContext(_THIS, SDL_GLContext context)
return;
}

#endif /* SDL_VIDEO_DRIVER_PSP */

/* vi: set ts=4 sw=4 expandtab: */
5 changes: 5 additions & 0 deletions src/video/psp/SDL_pspmouse.c
Expand Up @@ -20,6 +20,7 @@
*/
#include "../../SDL_internal.h"

#if SDL_VIDEO_DRIVER_PSP

#include <stdio.h>

Expand All @@ -34,3 +35,7 @@
struct WMcursor {
int unused;
};

#endif /* SDL_VIDEO_DRIVER_PSP */

/* vi: set ts=4 sw=4 expandtab: */

0 comments on commit 86f87bf

Please sign in to comment.