summaryrefslogtreecommitdiff
path: root/src/control/Script.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-05-28 12:46:51 +0300
committereray orçunus <erayorcunus@gmail.com>2020-05-28 12:46:51 +0300
commite6401bce181b2a9eb1ba31db0945e79277207a23 (patch)
tree1b5ba680e2f51ff00dbef7e48dc999be66066fec /src/control/Script.cpp
parent98a97a32fac0e97bd9810128d97c418ead52330e (diff)
Detect R and start game on menu
Diffstat (limited to 'src/control/Script.cpp')
-rw-r--r--src/control/Script.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 0b0341b4..bc15a695 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -538,22 +538,14 @@ void CRunningScript::Init()
}
#ifdef USE_DEBUG_SCRIPT_LOADER
+int scriptToLoad = 0;
+
#ifdef _WIN32
#include <Windows.h>
#endif
int open_script()
{
- static int scriptToLoad = 0;
-
- // Doesn't work because of CGame::Initialise is blocking
- /*
- if (glfwGetKey(PSGLOBAL(window), GLFW_KEY_G) == GLFW_PRESS)
- scriptToLoad = 0;
- if (glfwGetKey(PSGLOBAL(window), GLFW_KEY_R) == GLFW_PRESS)
- scriptToLoad = 1;
- if (glfwGetKey(PSGLOBAL(window), GLFW_KEY_D) == GLFW_PRESS)
- scriptToLoad = 2;
- */
+ // glfwGetKey doesn't work because of CGame::Initialise is blocking
#ifdef _WIN32
if (GetAsyncKeyState('G') & 0x8000)
scriptToLoad = 0;