mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-08 12:28:14 +00:00
Moved Android event initialization to SDL_InitEvents()
This commit is contained in:
@@ -52,7 +52,6 @@
|
|||||||
#include "thread/SDL_thread_c.h"
|
#include "thread/SDL_thread_c.h"
|
||||||
#include "video/SDL_pixels_c.h"
|
#include "video/SDL_pixels_c.h"
|
||||||
#include "video/SDL_video_c.h"
|
#include "video/SDL_video_c.h"
|
||||||
#include "video/android/SDL_androidevents.h"
|
|
||||||
#include "filesystem/SDL_filesystem_c.h"
|
#include "filesystem/SDL_filesystem_c.h"
|
||||||
|
|
||||||
#define SDL_INIT_EVERYTHING ~0U
|
#define SDL_INIT_EVERYTHING ~0U
|
||||||
@@ -226,10 +225,6 @@ int SDL_InitSubSystem(Uint32 flags)
|
|||||||
|
|
||||||
SDL_InitMainThread();
|
SDL_InitMainThread();
|
||||||
|
|
||||||
#ifdef SDL_PLATFORM_ANDROID
|
|
||||||
Android_InitEvents();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SDL_USE_LIBDBUS
|
#ifdef SDL_USE_LIBDBUS
|
||||||
SDL_DBus_Init();
|
SDL_DBus_Init();
|
||||||
#endif
|
#endif
|
||||||
@@ -576,10 +571,6 @@ void SDL_Quit(void)
|
|||||||
SDL_DBus_Quit();
|
SDL_DBus_Quit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SDL_PLATFORM_ANDROID
|
|
||||||
Android_QuitEvents();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
SDL_SetObjectsInvalid();
|
SDL_SetObjectsInvalid();
|
||||||
SDL_ClearHints();
|
SDL_ClearHints();
|
||||||
SDL_AssertionsQuit();
|
SDL_AssertionsQuit();
|
||||||
|
@@ -1788,6 +1788,9 @@ int SDL_SendSystemThemeChangedEvent(void)
|
|||||||
|
|
||||||
int SDL_InitEvents(void)
|
int SDL_InitEvents(void)
|
||||||
{
|
{
|
||||||
|
#ifdef SDL_PLATFORM_ANDROID
|
||||||
|
Android_InitEvents();
|
||||||
|
#endif
|
||||||
#ifndef SDL_JOYSTICK_DISABLED
|
#ifndef SDL_JOYSTICK_DISABLED
|
||||||
SDL_AddHintCallback(SDL_HINT_AUTO_UPDATE_JOYSTICKS, SDL_AutoUpdateJoysticksChanged, NULL);
|
SDL_AddHintCallback(SDL_HINT_AUTO_UPDATE_JOYSTICKS, SDL_AutoUpdateJoysticksChanged, NULL);
|
||||||
#endif
|
#endif
|
||||||
@@ -1818,4 +1821,7 @@ void SDL_QuitEvents(void)
|
|||||||
#ifndef SDL_SENSOR_DISABLED
|
#ifndef SDL_SENSOR_DISABLED
|
||||||
SDL_DelHintCallback(SDL_HINT_AUTO_UPDATE_SENSORS, SDL_AutoUpdateSensorsChanged, NULL);
|
SDL_DelHintCallback(SDL_HINT_AUTO_UPDATE_SENSORS, SDL_AutoUpdateSensorsChanged, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef SDL_PLATFORM_ANDROID
|
||||||
|
Android_QuitEvents();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user