summaryrefslogtreecommitdiffstats
path: root/src/control/Script.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-07-08 02:24:47 +0200
committerSergeanur <s.anureev@yandex.ua>2021-07-08 02:24:47 +0200
commit47f153fe76880ae3a62d82b1193c2a5a4d466836 (patch)
tree3c6a9949544f245c38a001b9c6848ba7bf731424 /src/control/Script.cpp
parentfix macro redefinition warnings on win-glfw build (diff)
downloadre3-47f153fe76880ae3a62d82b1193c2a5a4d466836.tar
re3-47f153fe76880ae3a62d82b1193c2a5a4d466836.tar.gz
re3-47f153fe76880ae3a62d82b1193c2a5a4d466836.tar.bz2
re3-47f153fe76880ae3a62d82b1193c2a5a4d466836.tar.lz
re3-47f153fe76880ae3a62d82b1193c2a5a4d466836.tar.xz
re3-47f153fe76880ae3a62d82b1193c2a5a4d466836.tar.zst
re3-47f153fe76880ae3a62d82b1193c2a5a4d466836.zip
Diffstat (limited to 'src/control/Script.cpp')
-rw-r--r--src/control/Script.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 1517ec52..e06acdc3 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -1769,21 +1769,16 @@ void CRunningScript::Init()
#ifdef USE_DEBUG_SCRIPT_LOADER
int scriptToLoad = 0;
-#ifdef _WIN32
-extern "C" __declspec(dllimport) short __stdcall GetAsyncKeyState(int);
-#endif
-
int open_script()
{
// glfwGetKey doesn't work because of CGame::Initialise is blocking
-#ifdef _WIN32
- if (GetAsyncKeyState('G') & 0x8000)
+ 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: return CFileMgr::OpenFile("main.scm", "rb");
case 1: return CFileMgr::OpenFile("main_freeroam.scm", "rb");