16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-20 05:39:18 +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() )