summaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'src/app')
-rw-r--r--src/app/app.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/app/app.cpp b/src/app/app.cpp
index 00977d1..0b9aae6 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -357,7 +357,7 @@ bool CApplication::Create()
/* SDL initialization sequence */
- Uint32 initFlags = SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_TIMER;
+ Uint32 initFlags = SDL_INIT_VIDEO | SDL_INIT_TIMER;
if (SDL_Init(initFlags) < 0)
{
@@ -368,6 +368,12 @@ bool CApplication::Create()
return false;
}
+ // This is non-fatal and besides seems to fix some memory leaks
+ if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) < 0)
+ {
+ GetLogger()->Warn("Joystick subsystem init failed\nJoystick(s) will not be available\n");
+ }
+
if ((IMG_Init(IMG_INIT_PNG) & IMG_INIT_PNG) == 0)
{
m_errorMessage = std::string("SDL_Image initialization error:\n") +
@@ -398,10 +404,6 @@ bool CApplication::Create()
SDL_JoystickEventState(SDL_IGNORE);
- // For now, enable joystick for testing
- SetJoystickEnabled(true);
-
-
// The video is ready, we can create and initalize the graphics device
m_device = new Gfx::CGLDevice(m_deviceConfig);
if (! m_device->Create() )