mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 14:49:19 +02:00
respektowanie autorepetycji klawiszy, cmdline narazie tak jak było z WinMain
This commit is contained in:
8
EU07.cpp
8
EU07.cpp
@@ -36,8 +36,6 @@ Stele, firleju, szociu, hunter, ZiomalCl, OLI_EU and others
|
|||||||
#pragma comment (lib, "dbghelp.lib")
|
#pragma comment (lib, "dbghelp.lib")
|
||||||
#pragma comment (lib, "glfw3.lib") //static
|
#pragma comment (lib, "glfw3.lib") //static
|
||||||
|
|
||||||
#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")
|
|
||||||
|
|
||||||
TWorld World;
|
TWorld World;
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#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::shiftState = (mods & GLFW_MOD_SHIFT) ? true : false;
|
||||||
Global::ctrlState = (mods & GLFW_MOD_CONTROL) ? true : false;
|
Global::ctrlState = (mods & GLFW_MOD_CONTROL) ? true : false;
|
||||||
|
|
||||||
if (action == GLFW_PRESS)
|
if (action == GLFW_PRESS || action == GLFW_REPEAT)
|
||||||
{
|
{
|
||||||
World.OnKeyDown(key);
|
World.OnKeyDown(key);
|
||||||
|
|
||||||
@@ -154,7 +152,7 @@ void focus_callback(GLFWwindow *window, int focus)
|
|||||||
Global::iPause |= 4; // włączenie pauzy, gdy nieaktywy
|
Global::iPause |= 4; // włączenie pauzy, gdy nieaktywy
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char argv[])
|
int CALLBACK WinMain(HINSTANCE, HINSTANCE, LPSTR lpCmdLine, int)
|
||||||
{
|
{
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
::SetUnhandledExceptionFilter(unhandled_handler);
|
::SetUnhandledExceptionFilter(unhandled_handler);
|
||||||
@@ -174,7 +172,7 @@ int main(int argc, char argv[])
|
|||||||
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN);
|
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string commandline(argv);
|
std::string commandline(lpCmdLine);
|
||||||
if (!commandline.empty())
|
if (!commandline.empty())
|
||||||
{
|
{
|
||||||
cParser parser(commandline);
|
cParser parser(commandline);
|
||||||
|
|||||||
Reference in New Issue
Block a user