1
0
forked from 0ad/0ad
0ad/source/tools/atlas/AtlasUI
wraitii 764440e017 Remove the Engine threading when using Atlas
MacOS requires some UI-related API calls to happen on the main thread.
There are several SDL functions that call UI-things, and those were,
since #500 / 08b4d96cf2, in a separate thread.
This crashes on Catalina, instead of simply warning (see #5470).

It is not the first time we had such issues, as originally the Engine
was on the main thread and AtlasUI on a separate thread.
That didn't work on MacOS, so the threading was inverted in #500 /
08b4d96cf2, with AtlasUI on the main thread and the Engine in another
thread.
Unfortunately, this still wasn't enough.

This formally unthreads the engine, running it on a wxTimer, to avoid
these issues.

Future work should focus on:
- Further decoupling the simulation from the engine itself, as what
Atlas really needs is a threaded simulation, not a threaded engine.
- Making the simulation itself more threaded
- Making it possible to do tasks asynchronously under Atlas.

Refs #500
Fixes #5470

Differential Revision: https://code.wildfiregames.com/D2752
This was SVN commit r24361.
2020-12-10 09:42:58 +00:00
..
ActorEditor Fix warnings with VS2015 introduced in 800bf0da24 2020-03-15 16:13:51 +00:00
CustomControls Allow map to recenter during resize in Atlas. Fixes #1109. 2020-07-21 02:08:50 +00:00
General Use C++17 to compile 0 A.D. 2020-12-01 14:17:12 +00:00
Misc Remove the Engine threading when using Atlas 2020-12-10 09:42:58 +00:00
ScenarioEditor Remove the Engine threading when using Atlas 2020-12-10 09:42:58 +00:00
TODO.txt Fix line endings of all files in source/ except source/third_party/. 2016-07-25 09:07:45 +00:00