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.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/video/allegro_v.cpp b/src/video/allegro_v.cpp
index de0a08eed..61ce20f13 100644
--- a/src/video/allegro_v.cpp
+++ b/src/video/allegro_v.cpp
@@ -404,7 +404,7 @@ int _allegro_instance_count = 0;
const char *VideoDriver_Allegro::Start(const char * const *parm)
{
- if (_allegro_instance_count == 0 && install_allegro(SYSTEM_AUTODETECT, &errno, NULL)) return NULL;
+ if (_allegro_instance_count == 0 && install_allegro(SYSTEM_AUTODETECT, &errno, NULL)) return "Failed to set up Allegro";
_allegro_instance_count++;
install_timer();
@@ -425,7 +425,9 @@ const char *VideoDriver_Allegro::Start(const char * const *parm)
#endif
GetVideoModes();
- CreateMainSurface(_cur_resolution.width, _cur_resolution.height);
+ if (!CreateMainSurface(_cur_resolution.width, _cur_resolution.height)) {
+ return "Failed to set up Allegro video";
+ }
MarkWholeScreenDirty();
set_close_button_callback(HandleExitGameRequest);