From 65d5311037f821098580a92c9577c025f59fdb84 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 10 Jun 2014 04:10:34 +0200 Subject: [PATCH] Revert "Don't try to show exceptions in a message box if SDL was not initialized" According to SDL docs, "This function may be called at any time, even before SDL_Init()". Also fixes an issue where message boxes weren't working due to SDL_Quit already having been called by ~Engine. This reverts commit 39eea24dc3866760cc40b79b6d57ebbc6799fc73. Conflicts: apps/openmw/main.cpp --- apps/openmw/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp index 3098d953e..302a9cf64 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp @@ -4,7 +4,8 @@ #include #include -#include +#include +#include #include "engine.hpp" #if defined(_WIN32) && !defined(_CONSOLE) @@ -286,7 +287,7 @@ int main(int argc, char**argv) catch (std::exception &e) { #if OGRE_PLATFORM == OGRE_PLATFORM_LINUX || OGRE_PLATFORM == OGRE_PLATFORM_APPLE - if (isatty(fileno(stdin)) || !SDL_WasInit(SDL_INIT_VIDEO)) + if (isatty(fileno(stdin))) std::cerr << "\nERROR: " << e.what() << std::endl; else #endif