Fix issues relating to SDL and wxWidgets interaction in Atlas.

This fixes the transfer of key inputs from WxWidgets to SDL, making it
possible to type in the in-game GUI from Atlas.

Also fixes whitespace issues in some Atlas files.

The following improvements are OSX specific:
- fixes an SDL assertion related to unused subsystems in Atlas.
- Remove the 'osxguiapplication' override. This fixes the editor
starting up in the background and not accepting input when launched from
in-game.
- To prevent an issue with sdl/wxwidgets conflict when running from
inside the game, actually boot a new instance (see #2427)


Reported by: wik (Many thanks for your investigations)
Tested by: trompetin17, Stan
Fixes #2427
Fixes #2846

Differential Revision: https://code.wildfiregames.com/D2788
This was SVN commit r23926.
This commit is contained in:
wraitii
2020-08-03 12:23:16 +00:00
parent 375c319639
commit 01118c1196
8 changed files with 182 additions and 90 deletions
+9
View File
@@ -86,6 +86,10 @@ that of Atlas depending on commandline parameters.
#include <unistd.h> // geteuid
#endif // OS_UNIX
#if OS_MACOSX
#include "lib/sysdep/os/osx/osx_atlas.h"
#endif
#if MSC_VERSION
#include <process.h>
#define getpid _getpid // Use the non-deprecated function name
@@ -719,8 +723,13 @@ static void RunGameOrAtlas(int argc, const char* argv[])
} while (g_Shutdown == ShutdownType::Restart);
#if OS_MACOSX
if (g_Shutdown == ShutdownType::RestartAsAtlas)
startNewAtlasProcess();
#else
if (g_Shutdown == ShutdownType::RestartAsAtlas)
ATLAS_RunIfOnCmdLine(args, true);
#endif
CXeromyces::Terminate();
}