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 39eea24dc3.

Conflicts:
	apps/openmw/main.cpp
This commit is contained in:
scrawl 2014-06-10 04:10:34 +02:00
parent c0c1db4490
commit 65d5311037

View file

@ -4,7 +4,8 @@
#include <components/version/version.hpp>
#include <components/files/configurationmanager.hpp>
#include <SDL.h>
#include <SDL_messagebox.h>
#include <SDL_main.h>
#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