Explorar o código

Window size is properly restored after exiting fullscreen mode (#332)

Aksel %!s(int64=5) %!d(string=hai) anos
pai
achega
f955075eb2
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      libs/sdl/sdl.c

+ 1 - 0
libs/sdl/sdl.c

@@ -459,6 +459,7 @@ HL_PRIM bool HL_NAME(win_set_fullscreen)(SDL_Window *win, int mode) {
 		// exit borderless
 		SetWindowLong(wnd,GWL_STYLE,save->style);
 		SetWindowPos(wnd,NULL,save->x,save->y,save->w,save->h,0);
+		SDL_SetWindowSize(win, save->w, save->h);
 		free(save);
 		SDL_SetWindowData(win,"save",NULL);
 		save = NULL;