Skip to content

Commit f9e4889

Browse files
authored
Merge pull request Aloshi#546 from tomaz82/fullscreen_borderless
Add support for fullscreen borderless window
2 parents 92b7bc4 + 0410864 commit f9e4889

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

es-app/src/main.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ bool parseArgs(int argc, char* argv[])
108108
Settings::getInstance()->setBool("Debug", true);
109109
Settings::getInstance()->setBool("HideConsole", false);
110110
Log::setReportingLevel(LogDebug);
111+
}else if(strcmp(argv[i], "--fullscreen-borderless") == 0)
112+
{
113+
Settings::getInstance()->setBool("FullscreenBorderless", true);
111114
}else if(strcmp(argv[i], "--windowed") == 0)
112115
{
113116
Settings::getInstance()->setBool("Windowed", true);

es-core/src/Renderer_init_sdlgl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ namespace Renderer
7373
sdlWindow = SDL_CreateWindow("EmulationStation",
7474
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
7575
windowWidth, windowHeight,
76-
SDL_WINDOW_OPENGL | (Settings::getInstance()->getBool("Windowed") ? 0 : SDL_WINDOW_FULLSCREEN));
76+
SDL_WINDOW_OPENGL | (Settings::getInstance()->getBool("Windowed") ? 0 : (Settings::getInstance()->getBool("FullscreenBorderless") ? SDL_WINDOW_BORDERLESS : SDL_WINDOW_FULLSCREEN)));
7777

7878
if(sdlWindow == NULL)
7979
{

es-core/src/Settings.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ std::vector<const char*> settings_dont_save {
2424
{ "SplashScreen" },
2525
{ "SplashScreenProgress" },
2626
{ "VSync" },
27+
{ "FullscreenBorderless" },
2728
{ "Windowed" },
2829
{ "WindowWidth" },
2930
{ "WindowHeight" },
@@ -59,6 +60,7 @@ void Settings::setDefaults()
5960
mBoolMap["ShowHiddenFiles"] = false;
6061
mBoolMap["DrawFramerate"] = false;
6162
mBoolMap["ShowExit"] = true;
63+
mBoolMap["FullscreenBorderless"] = false;
6264
mBoolMap["Windowed"] = false;
6365
mBoolMap["SplashScreen"] = true;
6466
mBoolMap["SplashScreenProgress"] = true;

0 commit comments

Comments
 (0)