|
|
@ -12,24 +12,12 @@
|
|
|
|
#define MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
|
|
|
|
#define MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
|
|
|
|
#endif // MAC_OS_X_VERSION_MIN_REQUIRED
|
|
|
|
#endif // MAC_OS_X_VERSION_MIN_REQUIRED
|
|
|
|
|
|
|
|
|
|
|
|
#include <SDL.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "maindialog.hpp"
|
|
|
|
#include "maindialog.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
{
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
SDL_SetHint(SDL_HINT_RENDER_DRIVER, "software");
|
|
|
|
|
|
|
|
SDL_SetMainReady();
|
|
|
|
|
|
|
|
if (SDL_Init(SDL_INIT_VIDEO) != 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
qDebug() << "SDL_Init failed: " << QString::fromUtf8(SDL_GetError());
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
signal(SIGINT, SIG_DFL); // We don't want to use the SDL event loop in the launcher,
|
|
|
|
|
|
|
|
// so reset SIGINT which SDL wants to redirect to an SDL_Quit event.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QApplication app(argc, argv);
|
|
|
|
QApplication app(argc, argv);
|
|
|
|
|
|
|
|
|
|
|
|
// Now we make sure the current dir is set to application path
|
|
|
|
// Now we make sure the current dir is set to application path
|
|
|
@ -46,9 +34,7 @@ int main(int argc, char *argv[])
|
|
|
|
if (result == Launcher::FirstRunDialogResultContinue)
|
|
|
|
if (result == Launcher::FirstRunDialogResultContinue)
|
|
|
|
mainWin.show();
|
|
|
|
mainWin.show();
|
|
|
|
|
|
|
|
|
|
|
|
int returnValue = app.exec();
|
|
|
|
return app.exec();
|
|
|
|
SDL_Quit();
|
|
|
|
|
|
|
|
return returnValue;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (std::exception& e)
|
|
|
|
catch (std::exception& e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|