Add option to disable window decoration

Add --window-borderless parameter.

Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
Diego Fernando Díaz A
2019-08-29 00:25:17 -05:00
committed by Romain Vimont
parent 9fd7a80a89
commit 59bc5bc1f5
5 changed files with 18 additions and 3 deletions

View File

@@ -164,7 +164,7 @@ bool
screen_init_rendering(struct screen *screen, const char *window_title,
struct size frame_size, bool always_on_top,
int16_t window_x, int16_t window_y, uint16_t window_width,
uint16_t window_height) {
uint16_t window_height, bool window_borderless) {
screen->frame_size = frame_size;
struct size window_size =
@@ -181,6 +181,9 @@ screen_init_rendering(struct screen *screen, const char *window_title,
"(compile with SDL >= 2.0.5 to enable it)");
#endif
}
if (window_borderless) {
window_flags |= SDL_WINDOW_BORDERLESS;
}
int x = window_x != -1 ? window_x : SDL_WINDOWPOS_UNDEFINED;
int y = window_y != -1 ? window_y : SDL_WINDOWPOS_UNDEFINED;