mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
(Unix) Added border to borderless window if the resolution was manually changed.
Also fixed a mistake introduced in the last commit.
This commit is contained in:
parent
d6baa2d132
commit
77076c22f4
|
@ -679,7 +679,7 @@ The amount of video RAM to use for the application. Defaults to 128 MiB which se
|
|||
|
||||
**Fullscreen mode (requires restart) - Unix only**
|
||||
|
||||
This gives you a choice between Normal and Borderless modes. With the borderless being more seamless as the ES window will always stay on top of other windows so the taskbar will not be visible when launching and exiting from games. It will however break the alt-tab application switching of your window manager.
|
||||
This gives you a choice between Normal and Borderless modes. With the borderless being more seamless as the ES window will always stay on top of other windows so the taskbar will not be visible when launching and returning from games. It will however break the alt-tab application switching of your window manager. For normal fullscreen mode, if a lower resolution than the screen resolution has been set via the --resolution command line argument, ES will render in full screen at the lower resolution. If a higher resolution than the screen resolution has been set, ES will run in a window. For the borderless mode, any changes to the resolution will make ES run in a window.
|
||||
|
||||
**Power saver modes**
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ namespace Renderer
|
|||
// games or when manually switching windows using task switcher).
|
||||
SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0");
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) || defined(__unix__)
|
||||
bool userResolution = false;
|
||||
// Check if the user has changed the resolution from the command line.
|
||||
if (windowWidth != dispMode.w || windowHeight != dispMode.h)
|
||||
|
@ -133,10 +133,20 @@ namespace Renderer
|
|||
// border to the window.
|
||||
windowFlags = SDL_WINDOW_ALLOW_HIGHDPI | getWindowFlags();
|
||||
#else
|
||||
if (Settings::getInstance()->getBool("Windowed"))
|
||||
if (Settings::getInstance()->getBool("Windowed")) {
|
||||
windowFlags = getWindowFlags();
|
||||
else if (Settings::getInstance()->getString("FullscreenMode") == "borderless")
|
||||
}
|
||||
else if (Settings::getInstance()->getString("FullscreenMode") == "borderless") {
|
||||
if(!userResolution)
|
||||
windowFlags = SDL_WINDOW_BORDERLESS | SDL_WINDOW_ALWAYS_ON_TOP | getWindowFlags();
|
||||
else
|
||||
// If the user has changed the resolution from the command line, then add a
|
||||
// border to the window and don't make it stay on top.
|
||||
windowFlags = getWindowFlags();
|
||||
}
|
||||
else {
|
||||
windowFlags = SDL_WINDOW_FULLSCREEN | getWindowFlags();
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((sdlWindow = SDL_CreateWindow("EmulationStation", SDL_WINDOWPOS_UNDEFINED,
|
||||
|
|
Loading…
Reference in a new issue