From f025db274c08f6fe6ac34cc96828e78dc1c8ee32 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Wed, 18 Jan 2023 20:11:55 +0200 Subject: [PATCH] 41010b5 --- include/savestate.h | 1 + od-win32/resources/winuae.rc | 8 ++++---- od-win32/rp.cpp | 36 +++++++++++++++++++++++++----------- od-win32/win32.h | 6 +++--- od-win32/win32gui.cpp | 2 +- od-win32/winuaechangelog.txt | 6 ++++++ savestate.cpp | 29 +++++++++++++++++++++-------- 7 files changed, 61 insertions(+), 27 deletions(-) diff --git a/include/savestate.h b/include/savestate.h index b295ac3d..70b8dff0 100644 --- a/include/savestate.h +++ b/include/savestate.h @@ -242,6 +242,7 @@ extern void restore_state(const TCHAR *filename); extern bool savestate_restore_finish(void); extern void savestate_restore_final(void); extern void savestate_memorysave(void); +extern bool is_savestate_incompatible(void); extern void custom_prepare_savestate(void); diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index 30494983..dd52ae87 100644 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -1417,8 +1417,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 4,10,0,0 - PRODUCTVERSION 4,10,0,0 + FILEVERSION 4,10,1,0 + PRODUCTVERSION 4,10,1,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -1434,12 +1434,12 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "WinUAE" - VALUE "FileVersion", "4.10.0.0" + VALUE "FileVersion", "4.10.1.0" VALUE "InternalName", "WinUAE" VALUE "LegalCopyright", "© 1996-2023 under the GNU Public License (GPL)" VALUE "OriginalFilename", "WinUAE.exe" VALUE "ProductName", "WinUAE" - VALUE "ProductVersion", "4.10.0.0" + VALUE "ProductVersion", "4.10.1.0" END END BLOCK "VarFileInfo" diff --git a/od-win32/rp.cpp b/od-win32/rp.cpp index 0c371a3f..f1d4ae7a 100644 --- a/od-win32/rp.cpp +++ b/od-win32/rp.cpp @@ -39,6 +39,7 @@ #include "devices.h" #define RP_SCREENMODE_SCALE_MAX_X 128 +#define RP_SCREENMODE_SCALE_MAX_X_MASK 127 static int initialized; static RPGUESTINFO guestinfo; @@ -722,10 +723,9 @@ static void fixup_size (struct uae_prefs *prefs) static float getmult(float mult) { if (mult >= 3.5f) - return (mult - 3.5f + 4.0f) / 2.0f; //2.0f; // 4x - if (mult >= 2.5f) { + return mult / 2.0f; // 4x+ + if (mult >= 2.5f) return 1.5f; // 3x - } if (mult >= 1.5f) return 1.0f; // 2x if (mult >= 0.8f) @@ -820,7 +820,7 @@ static void get_screenmode (struct RPScreenMode *sm, struct uae_prefs *p, bool g vres += (int)vresm; if (hres > RES_SUPERHIRES) { - m = (int)vresm + 1; + m = (int)(vresm * 2.0f + 0.5f) - 1; } else if (hres == RES_SUPERHIRES) { m = vresm > 1.0f && vresm < 2.0f ? RP_SCREENMODE_SCALE_3X : RP_SCREENMODE_SCALE_2X; } else if (hres >= RES_SUPERHIRES + 1) { @@ -891,7 +891,7 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p) struct monconfig *gm = &p->gfx_monitor[mon->monitor_id]; struct monconfig *gmc = &currprefs.gfx_monitor[mon->monitor_id]; int smm = RP_SCREENMODE_SCALE (sm->dwScreenMode); - int smm_m = smm & 0x7f; + int smm_m = smm & RP_SCREENMODE_SCALE_MAX_X_MASK; int display = RP_SCREENMODE_DISPLAY (sm->dwScreenMode); int fs = 0; int hdbl = RES_HIRES, vdbl = VRES_DOUBLE; @@ -905,6 +905,10 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p) int width, height; bool half; +// Sleep(10000); +// smm = RP_SCREENMODE_SCALE_4X + 0; +// smm_m = smm; + storeflags = sm->dwScreenMode; minimized = 0; if (display) { @@ -930,6 +934,8 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p) if (!WIN32GFX_IsPicassoScreen(mon)) { + float xtramult = 1.0f; + if (smm == RP_SCREENMODE_SCALE_3X) { hdbl = RES_SUPERHIRES; @@ -985,9 +991,9 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p) } if (smm_m > RP_SCREENMODE_SCALE_4X) { - float em = smm_m / 4.0f; - hmult *= em; - vmult *= em; + xtramult = (smm_m + 1.0f) / 4.0f; + hmult *= xtramult; + vmult *= xtramult; } } if (hres == RES_LORES && vres > VRES_NONDOUBLE) @@ -1013,6 +1019,10 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p) else gm->gfx_size_win.height = sm->lClipHeight >> (VRES_MAX - vdbl); } + + gm->gfx_size_win.width = (int)(gm->gfx_size_win.width * xtramult); + gm->gfx_size_win.height = (int)(gm->gfx_size_win.height * xtramult); + if (half) { gm->gfx_size_win.width = gm->gfx_size_win.width * 3 / 2; gm->gfx_size_win.height = gm->gfx_size_win.height * 3 / 2; @@ -1748,9 +1758,10 @@ static void sendfeatures (void) feat = RP_FEATURE_POWERLED | RP_FEATURE_SCREEN1X | RP_FEATURE_FULLSCREEN; feat |= RP_FEATURE_PAUSE | RP_FEATURE_TURBO_CPU | RP_FEATURE_TURBO_FLOPPY | RP_FEATURE_VOLUME | RP_FEATURE_SCREENCAPTURE; - feat |= RP_FEATURE_STATE | RP_FEATURE_DEVICEREADWRITE; - if (currprefs.gfx_api) + feat |= RP_FEATURE_DEVICEREADWRITE; + if (currprefs.gfx_api) { feat |= RP_FEATURE_SCREENOVERLAY; + } if (WIN32GFX_IsPicassoScreen(mon)) { feat |= RP_FEATURE_SCREEN2X | RP_FEATURE_SCREEN3X | RP_FEATURE_SCREEN4X; } else { @@ -1764,7 +1775,10 @@ static void sendfeatures (void) feat |= RP_FEATURE_INPUTDEVICE_ANALOGSTICK; feat |= RP_FEATURE_INPUTDEVICE_LIGHTPEN; feat |= RP_FEATURE_RAWINPUT_EVENT; - write_log (_T("RP_IPC_TO_HOST_FEATURES=%x %d\n"), feat, WIN32GFX_IsPicassoScreen(mon)); + if (!is_savestate_incompatible()) { + feat |= RP_FEATURE_STATE; + } + write_log (_T("RP_IPC_TO_HOST_FEATURES=%08x %d\n"), feat, WIN32GFX_IsPicassoScreen(mon)); RPSendMessagex (RP_IPC_TO_HOST_FEATURES, feat, 0, NULL, 0, &guestinfo, NULL); } diff --git a/od-win32/win32.h b/od-win32/win32.h index 74575133..5e3e6e19 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -20,18 +20,18 @@ #define LANG_DLL_FULL_VERSION_MATCH 1 #if WINUAEPUBLICBETA -#define WINUAEBETA _T("4") +#define WINUAEBETA _T("5") #else #define WINUAEBETA _T("") #endif -#define WINUAEDATE MAKEBD(2023, 1, 14) +#define WINUAEDATE MAKEBD(2023, 1, 18) //#define WINUAEEXTRA _T("AmiKit Preview") //#define WINUAEEXTRA _T("Amiga Forever Edition") #ifndef WINUAEEXTRA -#define WINUAEEXTRA _T("") +#define WINUAEEXTRA _T("RC1") #endif #ifndef WINUAEREV #define WINUAEREV _T("") diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 046f14df..53cc3956 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -22647,7 +22647,7 @@ static int GetSettings (int all_options, HWND hwnd) if (gui_fullscreen) { gui_width = GetSystemMetrics(SM_CXSCREEN); gui_height = GetSystemMetrics(SM_CYSCREEN); - if (isfullscreen() > 0) { + if (isfullscreen() > 0 && currprefs.gfx_api < 2) { struct MultiDisplay *md = getdisplay(&currprefs, 0); int w = md->rect.right - md->rect.left; int h = md->rect.bottom - md->rect.top; diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index e6471864..a79291ba 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,4 +1,10 @@ +Beta 5 (RC1): + +- Fullscreen GUI Misc panel option ticked + D3D 11 mode exclusive fullscreen + enter GUI which drops back to desktop: GUI used full desktop size, when it should have used "work area" ("work area" does not include for example Task bar) +- End directory filesystem threads earlier in shutdown sequence, previously it was too late, after Amiga address space was freed, causing crash if filesystem queue had commands pending and they needed to read or write Amiga side memory. +- Improved Game ports panel Custom mapping autoswitch selection. Select first Custom config that has at least Amiga button fire button or second button mapped to connected input device that initiated autoswitch. + Beta 4: - Added continuous screenshot mode to GUI (Was previously available via input events). When ticked, screenshot is taken automatically every frame. diff --git a/savestate.cpp b/savestate.cpp index 9f2dcc20..7ba4bc2e 100644 --- a/savestate.cpp +++ b/savestate.cpp @@ -67,6 +67,7 @@ #include "a2091.h" #include "devices.h" #include "fsdb.h" +#include "gfxboard.h" int savestate_state = 0; static int savestate_first_capture; @@ -97,11 +98,9 @@ struct staterecord static struct staterecord **staterecords; -static void state_incompatible_warn (void) +bool is_savestate_incompatible(void) { - static int warned; int dowarn = 0; - int i; #ifdef BSDSOCKET if (currprefs.socket_emu) @@ -120,17 +119,25 @@ static void state_incompatible_warn (void) dowarn = 1; #endif #ifdef FILESYS - for(i = 0; i < currprefs.mountitems; i++) { + for(int i = 0; i < currprefs.mountitems; i++) { struct mountedinfo mi; int type = get_filesys_unitconfig (&currprefs, i, &mi); if (mi.ismounted && type != FILESYS_VIRTUAL && type != FILESYS_HARDFILE && type != FILESYS_HARDFILE_RDB) dowarn = 1; } + if (currprefs.rtgboards[0].rtgmem_type >= GFXBOARD_HARDWARE) { + dowarn = 1; + } + if (currprefs.rtgboards[1].rtgmem_size > 0) { + dowarn = 1; + } #endif - if (!warned && dowarn) { - warned = 1; - notify_user (NUMSG_STATEHD); +#ifdef WITH_PPC + if (currprefs.ppc_model) { + dowarn = 1; } +#endif + return dowarn != 0; } /* functions for reading/writing bytes, shorts and longs in big-endian @@ -1218,7 +1225,13 @@ int save_state (const TCHAR *filename, const TCHAR *description) int comp = savestate_docompress; if (!savestate_specialdump && !savestate_nodialogs) { - state_incompatible_warn (); + if (is_savestate_incompatible()) { + static int warned; + if (!warned) { + warned = 1; + notify_user(NUMSG_STATEHD); + } + } if (!save_filesys_cando ()) { gui_message (_T("Filesystem active. Try again later.")); return -1; -- 2.47.3