1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-02 02:53:32 +02:00

Only do focus fullscreen toggling on X11.

I haven't been able to reproduce this old thing on any setup I have. The patch
from 2013 was originally for X11, and Wayland's fullscreen doesn't allow for
this sort of thing, so let's start scoping this down for eventual removal when
X11 is finally out of our minds forever.
This commit is contained in:
Ethan Lee 2021-04-05 11:07:32 -04:00
parent 510ec07021
commit 5060b4dfe3
2 changed files with 2 additions and 14 deletions

View File

@ -43,17 +43,6 @@ KeyPoll::KeyPoll(void)
resetWindow = 0;
pressedbackspace=false;
useFullscreenSpaces = false;
if (SDL_strcmp(SDL_GetPlatform(), "Mac OS X") == 0)
{
useFullscreenSpaces = true;
const char *hint = SDL_GetHint(SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES);
if (hint != NULL)
{
useFullscreenSpaces = (SDL_strcmp(hint, "1") == 0);
}
}
linealreadyemptykludge = false;
isActive = true;
@ -288,7 +277,7 @@ void KeyPoll::Poll(void)
music.resume();
music.resumeef();
}
if (!useFullscreenSpaces)
if (SDL_strcmp(SDL_GetCurrentVideoDriver(), "x11") == 0)
{
if (wasFullscreen)
{
@ -308,7 +297,7 @@ void KeyPoll::Poll(void)
music.pause();
music.pauseef();
}
if (!useFullscreenSpaces)
if (SDL_strcmp(SDL_GetCurrentVideoDriver(), "x11") == 0)
{
wasFullscreen = !graphics.screenbuffer->isWindowed;
graphics.screenbuffer->isWindowed = true;

View File

@ -72,7 +72,6 @@ private:
std::map<SDL_JoystickID, SDL_GameController*> controllers;
std::map<SDL_GameControllerButton, bool> buttonmap;
int xVel, yVel;
bool useFullscreenSpaces;
Uint32 wasFullscreen;
};