summaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'src/app')
-rw-r--r--src/app/README.txt2
-rw-r--r--src/app/app.cpp12
-rw-r--r--src/app/app.h2
3 files changed, 9 insertions, 7 deletions
diff --git a/src/app/README.txt b/src/app/README.txt
index e4f69ec..92be8a6 100644
--- a/src/app/README.txt
+++ b/src/app/README.txt
@@ -1,4 +1,4 @@
/**
- * \dir app
+ * \dir src/app
* Main class of the application and system functions
*/
diff --git a/src/app/app.cpp b/src/app/app.cpp
index 8c2dd43..d6fc2dd 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() )
diff --git a/src/app/app.h b/src/app/app.h
index f1e2c7f..e887a63 100644
--- a/src/app/app.h
+++ b/src/app/app.h
@@ -75,7 +75,7 @@ enum VideoQueryResult
/**
- * \enum TrackedKeys
+ * \enum TrackedKey
* \brief Additional keys whose state (pressed/released) is tracked by CApplication
*/
enum TrackedKey