diff --git a/EU07.cpp b/EU07.cpp index d8f7633a..73c60005 100644 --- a/EU07.cpp +++ b/EU07.cpp @@ -365,8 +365,15 @@ int main(int argc, char *argv[]) ::SetWindowPos( Hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE ); #endif + if (Global.captureonstart) + { + Global.ControlPicking = false; + glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED); //capture cursor + } + else + Global.ControlPicking = true; + try { - Global.ControlPicking = true; if ((false == GfxRenderer.Init(window)) || (false == UILayer.init(window))) @@ -422,9 +429,6 @@ int main(int argc, char *argv[]) Console::On(); // włączenie konsoli #endif - Global.ControlPicking = false; - glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED); //capture cursor - try { while( ( false == glfwWindowShouldClose( window ) ) && ( true == World.Update() ) diff --git a/Globals.cpp b/Globals.cpp index cbf0b891..abb7e29f 100644 --- a/Globals.cpp +++ b/Globals.cpp @@ -669,6 +669,10 @@ global_settings::ConfigParse(cParser &Parser) { Parser.getTokens( 1 ); Parser >> compress_tex; } + else if (token == "captureonstart") { + Parser.getTokens( 1 ); + Parser >> captureonstart; + } } while ((token != "") && (token != "endconfig")); //(!Parser->EndOfFile) // na koniec trochę zależności if (!bLoadTraction) // wczytywanie drutów i słupów diff --git a/Globals.h b/Globals.h index 4f917656..d57b6860 100644 --- a/Globals.h +++ b/Globals.h @@ -176,6 +176,7 @@ struct global_settings { std::string screenshot_dir; bool loading_log = true; bool dds_upper_origin = false; + bool captureonstart = true; // methods void LoadIniFile( std::string asFileName );