Skip to content

Commit

Permalink
Add an option to start the game window maximized
Browse files Browse the repository at this point in the history
  • Loading branch information
Qrox committed Jan 4, 2020
1 parent 828501c commit 58ef4cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1790,7 +1790,7 @@ void options_manager::add_options_graphics()
#if !defined(__ANDROID__) // Android is always fullscreen
add( "FULLSCREEN", "graphics", translate_marker( "Fullscreen" ),
translate_marker( "Starts Cataclysm in one of the fullscreen modes. Requires restart." ),
{ { "no", translate_marker( "No" ) }, { "fullscreen", translate_marker( "Fullscreen" ) }, { "windowedbl", translate_marker( "Windowed borderless" ) } },
{ { "no", translate_marker( "No" ) }, { "maximized", translate_marker( "Maximized" ) }, { "fullscreen", translate_marker( "Fullscreen" ) }, { "windowedbl", translate_marker( "Windowed borderless" ) } },
"windowedbl", COPT_CURSES_HIDE
);
#endif
Expand Down
2 changes: 2 additions & 0 deletions src/sdltiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,8 @@ static void WinCreate()
window_flags |= SDL_WINDOW_FULLSCREEN_DESKTOP;
fullscreen = true;
SDL_SetHint( SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0" );
} else if( get_option<std::string>( "FULLSCREEN" ) == "maximized" ) {
window_flags |= SDL_WINDOW_MAXIMIZED;
}
#endif

Expand Down

0 comments on commit 58ef4cd

Please sign in to comment.