summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-07-08 23:05:26 +0200
committerSergeanur <s.anureev@yandex.ua>2021-07-08 23:05:26 +0200
commitd781db6c0f669eaccecee246260290aa20f70020 (patch)
treefc963b1e8f3c127a49095a127850bfc1cd09111e /src/control
parentMission audio cleanup + sound pause (diff)
parentUse CPad functions to check key states in script loader (diff)
downloadre3-d781db6c0f669eaccecee246260290aa20f70020.tar
re3-d781db6c0f669eaccecee246260290aa20f70020.tar.gz
re3-d781db6c0f669eaccecee246260290aa20f70020.tar.bz2
re3-d781db6c0f669eaccecee246260290aa20f70020.tar.lz
re3-d781db6c0f669eaccecee246260290aa20f70020.tar.xz
re3-d781db6c0f669eaccecee246260290aa20f70020.tar.zst
re3-d781db6c0f669eaccecee246260290aa20f70020.zip
Diffstat (limited to 'src/control')
-rw-r--r--src/control/Script.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 536055fa..224f9089 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -2573,20 +2573,16 @@ void CTheScripts::Shutdown()
int scriptToLoad = 0;
const char *scriptfile = "main.scm";
-#ifdef _WIN32
-#include <Windows.h>
-#endif
int open_script()
{
- // glfwGetKey doesn't work because of CGame::Initialise is blocking
-#ifdef _WIN32
- if (GetAsyncKeyState('G') & 0x8000)
+ // glfwGetKey doesn't work because of CGame::Initialise is blocking
+ CPad::UpdatePads();
+ if (CPad::GetPad(0)->GetChar('G'))
scriptToLoad = 0;
- if (GetAsyncKeyState('R') & 0x8000)
+ if (CPad::GetPad(0)->GetChar('R'))
scriptToLoad = 1;
- if (GetAsyncKeyState('D') & 0x8000)
+ if (CPad::GetPad(0)->GetChar('D'))
scriptToLoad = 2;
-#endif
switch (scriptToLoad) {
case 0: scriptfile = "main.scm"; break;
case 1: scriptfile = "freeroam_lcs.scm"; break;