Merge pull request #546 from tomaz82/fullscreen_borderless

Add support for fullscreen borderless window
This commit is contained in:
Jools Wills 2019-03-09 00:27:07 +00:00 committed by GitHub
commit f9e48897d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View file

@ -108,6 +108,9 @@ bool parseArgs(int argc, char* argv[])
Settings::getInstance()->setBool("Debug", true); Settings::getInstance()->setBool("Debug", true);
Settings::getInstance()->setBool("HideConsole", false); Settings::getInstance()->setBool("HideConsole", false);
Log::setReportingLevel(LogDebug); Log::setReportingLevel(LogDebug);
}else if(strcmp(argv[i], "--fullscreen-borderless") == 0)
{
Settings::getInstance()->setBool("FullscreenBorderless", true);
}else if(strcmp(argv[i], "--windowed") == 0) }else if(strcmp(argv[i], "--windowed") == 0)
{ {
Settings::getInstance()->setBool("Windowed", true); Settings::getInstance()->setBool("Windowed", true);

View file

@ -73,7 +73,7 @@ namespace Renderer
sdlWindow = SDL_CreateWindow("EmulationStation", sdlWindow = SDL_CreateWindow("EmulationStation",
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
windowWidth, windowHeight, windowWidth, windowHeight,
SDL_WINDOW_OPENGL | (Settings::getInstance()->getBool("Windowed") ? 0 : SDL_WINDOW_FULLSCREEN)); SDL_WINDOW_OPENGL | (Settings::getInstance()->getBool("Windowed") ? 0 : (Settings::getInstance()->getBool("FullscreenBorderless") ? SDL_WINDOW_BORDERLESS : SDL_WINDOW_FULLSCREEN)));
if(sdlWindow == NULL) if(sdlWindow == NULL)
{ {

View file

@ -24,6 +24,7 @@ std::vector<const char*> settings_dont_save {
{ "SplashScreen" }, { "SplashScreen" },
{ "SplashScreenProgress" }, { "SplashScreenProgress" },
{ "VSync" }, { "VSync" },
{ "FullscreenBorderless" },
{ "Windowed" }, { "Windowed" },
{ "WindowWidth" }, { "WindowWidth" },
{ "WindowHeight" }, { "WindowHeight" },
@ -59,6 +60,7 @@ void Settings::setDefaults()
mBoolMap["ShowHiddenFiles"] = false; mBoolMap["ShowHiddenFiles"] = false;
mBoolMap["DrawFramerate"] = false; mBoolMap["DrawFramerate"] = false;
mBoolMap["ShowExit"] = true; mBoolMap["ShowExit"] = true;
mBoolMap["FullscreenBorderless"] = false;
mBoolMap["Windowed"] = false; mBoolMap["Windowed"] = false;
mBoolMap["SplashScreen"] = true; mBoolMap["SplashScreen"] = true;
mBoolMap["SplashScreenProgress"] = true; mBoolMap["SplashScreenProgress"] = true;