Skip to content

Commit

Permalink
HX-DOS fix code not to un-maximize the window
Browse files Browse the repository at this point in the history
  • Loading branch information
joncampbell123 committed Nov 29, 2018
1 parent 006c4f8 commit f79eeb0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/gui/sdl_gui.cpp
Expand Up @@ -1133,7 +1133,9 @@ void GUI_Shortcut(int select) {
}

#ifdef WIN32
# ifndef C_HX_DOS
if(menu.maxwindow) ShowWindow(GetHWND(), SW_RESTORE);
# endif
#endif

shortcut=true;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/sdl_mapper.cpp
Expand Up @@ -3838,7 +3838,7 @@ void MAPPER_RunInternal() {
return;
}

#if defined(__WIN32__) && !defined(C_SDL2)
#if defined(__WIN32__) && !defined(C_SDL2) && !defined(C_HX_DOS)
if(menu.maxwindow) ShowWindow(GetHWND(), SW_RESTORE);
#endif
int cursor = SDL_ShowCursor(SDL_QUERY);
Expand Down
2 changes: 2 additions & 0 deletions vs2015/sdl/src/video/wincommon/SDL_sysevents.c
Expand Up @@ -171,6 +171,7 @@ static void SDL_RestoreGameMode(void)
{
#if defined(SDL_WIN32_HX_DOS)
ShowWindow(ParentWindowHWND, SW_MAXIMIZE);
return;
#endif

#ifdef _WIN32_WCE //Under ce we don't minimize, therefore no restore
Expand Down Expand Up @@ -200,6 +201,7 @@ static void SDL_RestoreDesktopMode(void)
{
#if defined(SDL_WIN32_HX_DOS)
ShowWindow(ParentWindowHWND, SW_MAXIMIZE);
return;
#endif

#ifdef _WIN32_WCE
Expand Down
2 changes: 2 additions & 0 deletions vs2015/sdl/src/video/windib/SDL_dibevents.c
Expand Up @@ -206,12 +206,14 @@ LRESULT DIB_HandleMessage(_THIS, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar

switch (msg) {
case WM_KILLFOCUS:
# ifndef SDL_WIN32_HX_DOS
if (!SDL_resizing &&
SDL_PublicSurface &&
(SDL_PublicSurface->flags & SDL_FULLSCREEN)) {
/* In fullscreen mode, this window must have focus... or else we must exit fullscreen mode! */
ShowWindow(ParentWindowHWND, SW_RESTORE);
}
# endif
break;
case WM_SYSKEYDOWN:
case WM_KEYDOWN: {
Expand Down

0 comments on commit f79eeb0

Please sign in to comment.