diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2021-08-08 17:34:28 +0300 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2021-08-08 17:34:28 +0300 |
commit | 8d9508bda497191bb17dcaa8ce64dfca039f95d9 (patch) | |
tree | c02aeb5b04f3475ad36d1563911e30baa0cc4703 /src/control | |
parent | 873840a6a50d9495f8ac410996cb88bedc2c4004 (diff) | |
parent | bd9658443381d91dd0bb1ded544617f2f0e3f1e0 (diff) |
Merge branch 'master' into miami
Diffstat (limited to 'src/control')
-rw-r--r-- | src/control/Script.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 0e403c49..0e8af1d5 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -729,6 +729,11 @@ int CTheScripts::ScriptToLoad = 0; int CTheScripts::OpenScript() { + // glfwGetKey doesn't work because of CGame::Initialise is blocking + CPad::UpdatePads(); + if (CPad::GetPad(0)->GetChar('G')) ScriptToLoad = 0; + if (CPad::GetPad(0)->GetChar('R')) ScriptToLoad = 1; + if (CPad::GetPad(0)->GetChar('D')) ScriptToLoad = 2; CFileMgr::ChangeDir("\\"); switch (ScriptToLoad) { case 0: return CFileMgr::OpenFile("data\\main.scm", "rb"); @@ -752,12 +757,6 @@ void CTheScripts::Init() UpsideDownCars.Init(); StuckCars.Init(); #ifdef USE_DEBUG_SCRIPT_LOADER - // glfwGetKey doesn't work because of CGame::Initialise is blocking - CPad::UpdatePads(); - if(CPad::GetPad(0)->GetChar('G')) ScriptToLoad = 0; - if(CPad::GetPad(0)->GetChar('R')) ScriptToLoad = 1; - if(CPad::GetPad(0)->GetChar('D')) ScriptToLoad = 2; - int mainf = OpenScript(); #else CFileMgr::SetDir("data"); |