mirror of https://github.com/encounter/SDL.git
minor tidy-up for ifdefs & co.
This commit is contained in:
parent
cd86e269e4
commit
504e7aa59b
16
src/SDL.c
16
src/SDL.c
|
@ -23,16 +23,16 @@
|
||||||
#if defined(__WIN32__)
|
#if defined(__WIN32__)
|
||||||
#include "core/windows/SDL_windows.h"
|
#include "core/windows/SDL_windows.h"
|
||||||
#elif defined(__OS2__)
|
#elif defined(__OS2__)
|
||||||
#include <stdlib.h> /* For _exit() */
|
#include <stdlib.h> /* _exit() */
|
||||||
#elif !defined(__WINRT__)
|
#elif !defined(__WINRT__)
|
||||||
#include <unistd.h> /* For _exit(), etc. */
|
#include <unistd.h> /* _exit(), etc. */
|
||||||
#endif
|
#endif
|
||||||
#if defined(__OS2__)
|
#if defined(__OS2__)
|
||||||
#include "core/os2/SDL_os2.h"
|
#include "core/os2/SDL_os2.h"
|
||||||
#endif
|
|
||||||
#if SDL_THREAD_OS2
|
#if SDL_THREAD_OS2
|
||||||
#include "thread/os2/SDL_systls_c.h"
|
#include "thread/os2/SDL_systls_c.h"
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* this checks for HAVE_DBUS_DBUS_H internally. */
|
/* this checks for HAVE_DBUS_DBUS_H internally. */
|
||||||
#include "core/linux/SDL_dbus.h"
|
#include "core/linux/SDL_dbus.h"
|
||||||
|
@ -151,7 +151,7 @@ int
|
||||||
SDL_InitSubSystem(Uint32 flags)
|
SDL_InitSubSystem(Uint32 flags)
|
||||||
{
|
{
|
||||||
Uint32 flags_initialized = 0;
|
Uint32 flags_initialized = 0;
|
||||||
|
|
||||||
if (!SDL_MainIsReady) {
|
if (!SDL_MainIsReady) {
|
||||||
SDL_SetError("Application didn't initialize properly, did you include SDL_main.h in the file containing your main() function?");
|
SDL_SetError("Application didn't initialize properly, did you include SDL_main.h in the file containing your main() function?");
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -318,7 +318,7 @@ SDL_InitSubSystem(Uint32 flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
quit_and_error:
|
quit_and_error:
|
||||||
SDL_QuitSubSystem(flags_initialized);
|
SDL_QuitSubSystem(flags_initialized);
|
||||||
return (-1);
|
return (-1);
|
||||||
|
@ -333,10 +333,10 @@ SDL_Init(Uint32 flags)
|
||||||
void
|
void
|
||||||
SDL_QuitSubSystem(Uint32 flags)
|
SDL_QuitSubSystem(Uint32 flags)
|
||||||
{
|
{
|
||||||
|
#if defined(__OS2__)
|
||||||
#if SDL_THREAD_OS2
|
#if SDL_THREAD_OS2
|
||||||
SDL_OS2TLSFree(); /* thread/os2/SDL_systls.c */
|
SDL_OS2TLSFree(); /* thread/os2/SDL_systls.c */
|
||||||
#endif
|
#endif
|
||||||
#if defined(__OS2__)
|
|
||||||
SDL_OS2Quit();
|
SDL_OS2Quit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -506,7 +506,7 @@ SDL_GetRevisionNumber(void)
|
||||||
|
|
||||||
/* Get the name of the platform */
|
/* Get the name of the platform */
|
||||||
const char *
|
const char *
|
||||||
SDL_GetPlatform()
|
SDL_GetPlatform(void)
|
||||||
{
|
{
|
||||||
#if __AIX__
|
#if __AIX__
|
||||||
return "AIX";
|
return "AIX";
|
||||||
|
@ -568,7 +568,7 @@ SDL_GetPlatform()
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_bool
|
SDL_bool
|
||||||
SDL_IsTablet()
|
SDL_IsTablet(void)
|
||||||
{
|
{
|
||||||
#if __ANDROID__
|
#if __ANDROID__
|
||||||
extern SDL_bool SDL_IsAndroidTablet(void);
|
extern SDL_bool SDL_IsAndroidTablet(void);
|
||||||
|
|
Loading…
Reference in New Issue