1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-25 22:18:30 +02:00

Remove unnecessary cursor toggling when toggling fullscreen

For some reason, the cursor would be either disabled and re-enabled if
you switched to windowed mode, or it would be always enabled if you
switched to fullscreen mode. This only happened when you toggled
fullscreen using the Alt+Enter, Alt+F, or F11 keybinds, and the
fullscreen option in graphic options doesn't have this problem.

This cursor toggling business seems like an arcane incantation back in
the days of SDL1.2, now since no longer necessary with SDL2. However,
after some testing, it seems like removing these indecipherable runes
don't cause any harm, so I'm going to remove them.

Fixes #371.
This commit is contained in:
Misa 2020-08-04 18:16:50 -07:00 committed by Ethan Lee
parent 5de6f22175
commit 1a64e9c528

View File

@ -466,22 +466,6 @@ void inline fixedloop()
key.Poll();
if(key.toggleFullscreen)
{
if(!gameScreen.isWindowed)
{
SDL_ShowCursor(SDL_DISABLE);
SDL_ShowCursor(SDL_ENABLE);
}
else
{
SDL_ShowCursor(SDL_ENABLE);
}
if(game.gamestate == EDITORMODE)
{
SDL_ShowCursor(SDL_ENABLE);
}
gameScreen.toggleFullScreen();
game.fullscreen = !game.fullscreen;
key.toggleFullscreen = false;