summaryrefslogtreecommitdiff
path: root/src/video/allegro_v.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/video/allegro_v.cpp')
-rw-r--r--src/video/allegro_v.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/video/allegro_v.cpp b/src/video/allegro_v.cpp
index 8ff1cc634..0c064873b 100644
--- a/src/video/allegro_v.cpp
+++ b/src/video/allegro_v.cpp
@@ -412,7 +412,7 @@ bool VideoDriver_Allegro::PollEvent()
*/
int _allegro_instance_count = 0;
-const char *VideoDriver_Allegro::Start(const StringList &parm)
+const char *VideoDriver_Allegro::Start(const StringList &param)
{
if (_allegro_instance_count == 0 && install_allegro(SYSTEM_AUTODETECT, &errno, nullptr)) {
DEBUG(driver, 0, "allegro: install_allegro failed '%s'", allegro_error);
@@ -440,6 +440,8 @@ const char *VideoDriver_Allegro::Start(const StringList &parm)
MarkWholeScreenDirty();
set_close_button_callback(HandleExitGameRequest);
+ this->is_game_threaded = !GetDriverParamBool(param, "no_threads") && !GetDriverParamBool(param, "no_thread");
+
return nullptr;
}
@@ -475,12 +477,16 @@ void VideoDriver_Allegro::InputLoop()
void VideoDriver_Allegro::MainLoop()
{
+ this->StartGameThread();
+
for (;;) {
- if (_exit_game) return;
+ if (_exit_game) break;
this->Tick();
this->SleepTillNextTick();
}
+
+ this->StopGameThread();
}
bool VideoDriver_Allegro::ChangeResolution(int w, int h)