16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 00:49:19 +02:00

add ini setting for capturing mouse on start

This commit is contained in:
milek7
2018-06-25 13:36:39 +02:00
parent 48f2265c34
commit a9713a6ee4
3 changed files with 13 additions and 4 deletions

View File

@@ -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() )

View File

@@ -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

View File

@@ -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 );