From 46ec65bcb2357a0a263bfdcbc47e6664ff19fb6a Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Fri, 1 Feb 2019 10:07:19 +0100 Subject: [PATCH] Enable fullscreen Window mode can be set by providing -x at the command line --- Stub/DiabloUI/sdlrender.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Stub/DiabloUI/sdlrender.cpp b/Stub/DiabloUI/sdlrender.cpp index fd5e65db5..f5d96bf90 100644 --- a/Stub/DiabloUI/sdlrender.cpp +++ b/Stub/DiabloUI/sdlrender.cpp @@ -190,7 +190,11 @@ void SdlDiabloMainWindow() atexit(TTF_Quit); SDL_Init(SDL_INIT_EVERYTHING); - window = SDL_CreateWindow("Diablo", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, SDL_WINDOW_RESIZABLE); + int flags = SDL_WINDOW_FULLSCREEN_DESKTOP; + if (!fullscreen) { + flags = SDL_WINDOW_RESIZABLE; + } + window = SDL_CreateWindow("Diablo", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, flags); renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_PRESENTVSYNC); printf("Window And Renderer Created!\n");