From 7f27c49f883aa983c51523d77aa2faf20fcbceec Mon Sep 17 00:00:00 2001 From: maron2000 <68574602+maron2000@users.noreply.github.com> Date: Tue, 29 Oct 2024 22:19:42 +0900 Subject: [PATCH 1/2] Fix fullscreen mode not responding when launched in TTF mode (Windows) --- CHANGELOG | 2 ++ src/gui/sdlmain.cpp | 6 +++++- src/shell/shell.cpp | 10 +++++++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index e451191355..974a5365c1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,6 @@ Next + - Fixed fullscreen mode not responding when launched in TTF mode + in Windows (maron2000) - Fixed crashes when changing floppies mounted by drive numbers on a booted guest OS (maron2000) - Fixed launching host programs with white spaces in path (Windows) diff --git a/src/gui/sdlmain.cpp b/src/gui/sdlmain.cpp index 7f93f4c97d..6db0b96529 100644 --- a/src/gui/sdlmain.cpp +++ b/src/gui/sdlmain.cpp @@ -3809,8 +3809,12 @@ static void GUI_StartUp() { posy = -1; const char* windowposition = section->Get_string("windowposition"); LOG_MSG("Configured windowposition: %s", windowposition); - if (windowposition && !strcmp(windowposition, "-")) + if(windowposition && !strcmp(windowposition, "-")) +#if defined (WIN32) && !defined(C_SDL2) + posx = posy = -1; +#else posx = posy = -2; +#endif else if (windowposition && *windowposition && strcmp(windowposition, ",")) { char result[100]; safe_strncpy(result, windowposition, sizeof(result)); diff --git a/src/shell/shell.cpp b/src/shell/shell.cpp index 9de39e4edf..be5bb04fec 100644 --- a/src/shell/shell.cpp +++ b/src/shell/shell.cpp @@ -880,7 +880,7 @@ void DOS_Shell::Prepare(void) { } } } - if (country>0&&!control->opt_noconfig) { + if (country>0&&!control->opt_noconfig) { countryNo = country; DOS_SetCountry(countryNo); } @@ -1139,7 +1139,6 @@ class AUTOEXEC:public Module_base { } if (control->opt_prerun) cmd += "\n"; } - autoexec_auto_bat.Install(cmd); } dos.loaded_codepage = cp; @@ -1264,7 +1263,12 @@ class AUTOEXEC:public Module_base { #else if (secure) autoexec[i++].Install("z:\\system\\config.com -securemode"); #endif - +#if defined(WIN32) + if(TTF_using()) { + autoexec[i++].Install("@config -set output=surface"); + autoexec[i++].Install("@config -set output=ttf"); + } +#endif if (addexit) autoexec[i++].Install("exit"); assert(i <= 17); /* FIXME: autoexec[] should not be fixed size */ From cd0a5dd66d24724863c6f7b2a282767c10561a6c Mon Sep 17 00:00:00 2001 From: maron2000 <68574602+maron2000@users.noreply.github.com> Date: Wed, 30 Oct 2024 18:17:01 +0900 Subject: [PATCH 2/2] Change order of menubar to access inaccessible items due to overlapped menus --- src/gui/menu.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/menu.cpp b/src/gui/menu.cpp index 2b0780d606..82b7734a88 100644 --- a/src/gui/menu.cpp +++ b/src/gui/menu.cpp @@ -124,10 +124,10 @@ static const char *def_menu__toplevel[] = "VideoMenu", "SoundMenu", "DOSMenu", + "DriveMenu", #if !defined(C_EMSCRIPTEN) "CaptureMenu", #endif - "DriveMenu", #if C_DEBUG "DebugMenu", #endif @@ -709,9 +709,9 @@ static const char *def_menu_capture[] = "mapper_capnetrf", "--", #endif - "saveoptionmenu", "mapper_savestate", "mapper_loadstate", + "saveoptionmenu", "saveslotmenu", "autosavecfg", "browsesavefile", @@ -860,7 +860,7 @@ static const char* def_menu_help_debug[] = static const char *def_menu_help[] = { "help_intro", - "HelpCommandMenu", + "help_about", #if !defined(HX_DOS) "--", "help_homepage", @@ -880,7 +880,7 @@ static const char *def_menu_help[] = #if C_PCAP || C_PRINTER && defined(WIN32) || !C_DEBUG && !defined(MACOSX) && !defined(LINUX) && !defined(HX_DOS) && !defined(C_EMSCRIPTEN) "--", #endif - "help_about", + "HelpCommandMenu", NULL };