From 663dc642c7275223858e7124aa3add1c2193584c Mon Sep 17 00:00:00 2001 From: ThingUroboros Date: Mon, 15 May 2017 23:32:08 +0200 Subject: [PATCH] win.c Condition for fullscreen keyboard shortcut (CTRL+ALT+PAGEUP) --- src/win.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/src/win.c b/src/win.c index 354ba252e..c3bc6a176 100644 --- a/src/win.c +++ b/src/win.c @@ -1798,21 +1798,25 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM break; case IDM_VID_FULLSCREEN: - if (video_fullscreen_first) - { - video_fullscreen_first = 0; - msgbox_info(ghwnd, 2193); - } - startblit(); - video_wait_for_blit(); - mouse_close(); - vid_apis[0][vid_api].close(); - video_fullscreen = 1; - vid_apis[1][vid_api].init(ghwnd); - mouse_init(); - leave_fullscreen_flag = 0; - endblit(); - device_force_redraw(); + + if(video_fullscreen!=1){ + + if (video_fullscreen_first) + { + video_fullscreen_first = 0; + msgbox_info(ghwnd, 2193); + } + startblit(); + video_wait_for_blit(); + mouse_close(); + vid_apis[0][vid_api].close(); + video_fullscreen = 1; + vid_apis[1][vid_api].init(ghwnd); + mouse_init(); + leave_fullscreen_flag = 0; + endblit(); + device_force_redraw(); + } break; case IDM_VID_FS_FULL: