Merge pull request #883 from adrian17/window-scrolling

Don't scroll the window if it lost keyboard focus
This commit is contained in:
Ted John 2015-02-27 23:47:49 +00:00
commit a432c62684
1 changed files with 4 additions and 0 deletions

View File

@ -1302,6 +1302,10 @@ void game_handle_edge_scroll()
if (mainWindow->viewport == NULL)
return;
uint32 window_flags = SDL_GetWindowFlags(gWindow);
if ((window_flags & SDL_WINDOW_INPUT_FOCUS) == 0)
return;
scrollX = 0;
scrollY = 0;