From 3fc1cc9749e26e60eab39ea073e5ef4e30afc7e2 Mon Sep 17 00:00:00 2001 From: VB Date: Sun, 12 Feb 2017 11:41:56 +0100 Subject: [PATCH] =?UTF-8?q?respektowanie=20autorepetycji=20klawiszy,=20cmd?= =?UTF-8?q?line=20narazie=20tak=20jak=20by=C5=82o=20z=20WinMain?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EU07.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/EU07.cpp b/EU07.cpp index fc980675..e0bba27b 100644 --- a/EU07.cpp +++ b/EU07.cpp @@ -36,8 +36,6 @@ Stele, firleju, szociu, hunter, ZiomalCl, OLI_EU and others #pragma comment (lib, "dbghelp.lib") #pragma comment (lib, "glfw3.lib") //static -#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup") - TWorld World; #ifdef _WINDOWS @@ -116,7 +114,7 @@ void key_callback(GLFWwindow *window, int key, int scancode, int action, int mod Global::shiftState = (mods & GLFW_MOD_SHIFT) ? true : false; Global::ctrlState = (mods & GLFW_MOD_CONTROL) ? true : false; - if (action == GLFW_PRESS) + if (action == GLFW_PRESS || action == GLFW_REPEAT) { World.OnKeyDown(key); @@ -154,7 +152,7 @@ void focus_callback(GLFWwindow *window, int focus) Global::iPause |= 4; // włączenie pauzy, gdy nieaktywy } -int main(int argc, char argv[]) +int CALLBACK WinMain(HINSTANCE, HINSTANCE, LPSTR lpCmdLine, int) { #ifdef _WINDOWS ::SetUnhandledExceptionFilter(unhandled_handler); @@ -174,7 +172,7 @@ int main(int argc, char argv[]) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN); } - std::string commandline(argv); + std::string commandline(lpCmdLine); if (!commandline.empty()) { cParser parser(commandline);