summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorPetr Mrázek2011-08-16 03:33:12 +0000
committerPetr Mrázek2011-08-16 03:33:12 +0000
commitad6fc952ad3a4c7dc241c718b1f095c2cf0ba7ae (patch)
treee6b4eeef83ac019d5267c341cee61ecd80829b9a /main.cpp
parent4346b272acc35470a4084ceaa76518db210c9a2b (diff)
downloadstonesense-ad6fc952ad3a4c7dc241c718b1f095c2cf0ba7ae.tar.gz
stonesense-ad6fc952ad3a4c7dc241c718b1f095c2cf0ba7ae.tar.bz2
stonesense-ad6fc952ad3a4c7dc241c718b1f095c2cf0ba7ae.tar.xz
debugging allegro problems
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp29
1 files changed, 14 insertions, 15 deletions
diff --git a/main.cpp b/main.cpp
index d89a257..c554f13 100644
--- a/main.cpp
+++ b/main.cpp
@@ -478,7 +478,20 @@ static void * stonesense_thread(ALLEGRO_THREAD * thred, void * parms)
stonesense_started = 0;
return NULL;
}
-
+ if(!al_is_keyboard_installed())
+ {
+ if (!al_install_keyboard())
+ {
+ DFConsole->printerr("Stonesense: al_install_keyboard failed\n");
+ }
+ }
+ if(!al_is_mouse_installed())
+ {
+ if (!al_install_mouse())
+ {
+ DFConsole->printerr("Stonesense: al_install_mouse failed\n");
+ }
+ }
SetTitle("Stonesense");
if(config.software)
@@ -630,20 +643,6 @@ DFhackCExport command_result stonesense_command(DFHack::Core * c, std::vector<st
DFConsole->printerr("al_init_ttf_addon failed. \n");
return CR_FAILURE;
}
-
- if(!al_is_keyboard_installed())
- if (!al_install_keyboard()) {
- DFConsole->printerr("al_install_keyboard failed\n");
- return CR_FAILURE;
- }
- if(!al_is_mouse_installed())
- {
- if (!al_install_mouse())
- {
- DFConsole->printerr("al_install_mouse failed\n");
- return CR_FAILURE;
- }
- }
}
thread = al_create_thread(stonesense_thread, (void * )c);