mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-28 01:47:10 +00:00
Main.cpp cleanup.
Use an enum to indicate the type of engine shutdown instead of three bools. State in the comments that the program is restarted within the same process. In preparation of introducing an IsQuitRequested function (which shall not be named is_quit_requested as stressed by Vladislav): Rename kill_mainloop to QuitEngine, restart_mainloop to RestartEngine, restart_mainloop_in_atlas to StartAtlas to not break consistency. Don't rename RestartInAtlas in JS just now. Group declarations at the top of main.cpp. This was SVN commit r21817.
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
#include "ps/Mod.h"
|
||||
#include "scriptinterface/ScriptInterface.h"
|
||||
|
||||
extern void restart_engine();
|
||||
extern void RestartEngine();
|
||||
|
||||
JS::Value JSI_Mod::GetEngineInfo(ScriptInterface::CxPrivate* pCxPrivate)
|
||||
{
|
||||
@@ -46,7 +46,7 @@ JS::Value JSI_Mod::GetAvailableMods(ScriptInterface::CxPrivate* pCxPrivate)
|
||||
|
||||
void JSI_Mod::RestartEngine(ScriptInterface::CxPrivate* UNUSED(pCxPrivate))
|
||||
{
|
||||
restart_engine();
|
||||
::RestartEngine();
|
||||
}
|
||||
|
||||
void JSI_Mod::SetMods(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::vector<CStr>& mods)
|
||||
|
||||
Reference in New Issue
Block a user