Skip to content
Snippets Groups Projects
Commit 02dce657 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Update fullscreen and mode on Darwin to match window

This should normalize everything, with the possible exception of
"zoom" (the thing other OSs call maximized).  Ideally, we wouldn't
allow window size changes when "zoomed" if we could detect the state,
but it doesn't look like we can.
parent eb17b48c
No related branches found
No related tags found
No related merge requests found
Pipeline #6661 failed
......@@ -1039,10 +1039,16 @@ void sdl_video_event_thread(void *data)
break;
case SDL_WINDOWEVENT:
switch(ev.window.event) {
case SDL_WINDOWEVENT_SIZE_CHANGED:
// SDL2: User resized window
case SDL_WINDOWEVENT_MAXIMIZED:
case SDL_WINDOWEVENT_RESTORED:
#if defined(__DARWIN__)
fullscreen = (sdl.GetWindowFlags(win) & SDL_WINDOW_MAXIMIZED) != 0;
cio_api.mode=fullscreen?CIOLIB_MODE_SDL_FULLSCREEN:CIOLIB_MODE_SDL;
update_cvstat(vs);
#endif
// Fall-through
case SDL_WINDOWEVENT_SIZE_CHANGED:
// SDL2: User resized window
case SDL_WINDOWEVENT_RESIZED:
pthread_mutex_lock(&sdl_mode_mutex);
if (sdl_mode) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment