diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2021-08-08 16:34:03 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2021-08-08 16:34:03 +0200 |
commit | bd9658443381d91dd0bb1ded544617f2f0e3f1e0 (patch) | |
tree | 04c3c0973a042cb7c161f5dc93ea6b3cacf63235 /src/control/Script.cpp | |
parent | small fix (diff) | |
download | re3-bd9658443381d91dd0bb1ded544617f2f0e3f1e0.tar re3-bd9658443381d91dd0bb1ded544617f2f0e3f1e0.tar.gz re3-bd9658443381d91dd0bb1ded544617f2f0e3f1e0.tar.bz2 re3-bd9658443381d91dd0bb1ded544617f2f0e3f1e0.tar.lz re3-bd9658443381d91dd0bb1ded544617f2f0e3f1e0.tar.xz re3-bd9658443381d91dd0bb1ded544617f2f0e3f1e0.tar.zst re3-bd9658443381d91dd0bb1ded544617f2f0e3f1e0.zip |
Diffstat (limited to 'src/control/Script.cpp')
-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 4501c27f..77d571d0 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -502,6 +502,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"); @@ -525,12 +530,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"); |