Skip to content
Permalink
Browse files

No cursor lock when window inactive (#5754)

  • Loading branch information
SmallJoker committed May 13, 2017
1 parent 0d4d35a commit febd07fc0dea400db17ab84dd9fcb4d64e3ce9e3
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/game.cpp
@@ -2956,7 +2956,8 @@ void Game::toggleFullViewRange()

void Game::updateCameraDirection(CameraOrientation *cam, float dtime)
{
if ((device->isWindowActive() && !isMenuActive()) || random_input) {
if ((device->isWindowActive() && device->isWindowFocused()
&& !isMenuActive()) || random_input) {

#ifndef __ANDROID__
if (!random_input) {
@@ -2981,8 +2982,7 @@ void Game::updateCameraDirection(CameraOrientation *cam, float dtime)
device->getCursorControl()->setVisible(true);
#endif

if (!m_first_loop_after_window_activation)
m_first_loop_after_window_activation = true;
m_first_loop_after_window_activation = true;

}
}

1 comment on commit febd07f

@HybridDog

This comment has been minimized.

Copy link
Contributor

@HybridDog HybridDog commented on febd07f May 14, 2017

When the window isn't focused, rendering could be interrupted…

Please sign in to comment.
You can’t perform that action at this time.