Fix OSX not starting matches following 8fbc095a88.

That commit illegaly polled SDL events from a different thread which for
an unknown reason did not error on Windows and GNU/linux.

Refs #4822 / D1304, similarly 8fec942e8a.

Differential Revision: https://code.wildfiregames.com/D1484
Previous iteration tested on OSX and some comments with regards to
letter case by Vladislav (refs 27da92e55f, 4c73614955).

This was SVN commit r21818.
This commit is contained in:
elexis
2018-05-08 10:03:46 +00:00
parent 27da92e55f
commit a5d1e0068b
4 changed files with 18 additions and 3 deletions
+4 -2
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2017 Wildfire Games.
/* Copyright (C) 2018 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -149,8 +149,10 @@ JS::HandleObject VisualReplay::ReloadReplayCache(const ScriptInterface& scriptIn
for (const OsPath& directory : directories)
{
// This cannot use IsQuitRequested(), because the current loop and that function both run in the main thread.
// So SDL events are not processed unless called explicitly here.
if (SDL_QuitRequested())
// We want to save our progress in searching through the replays
// Don't return, because we want to save our progress
break;
const OsPath replayFile = GetDirectoryName() / directory / L"commands.txt";