From: Toni Wilen Date: Mon, 16 Jul 2018 20:40:23 +0000 (+0300) Subject: 4010 X-Git-Tag: 4010^0 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=8097503bfd0e79d3039d0e1d3e1d4cf20edfbfd1;p=francis%2Fwinuae.git 4010 --- diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index 50b3cb99..f2bcac69 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -904,21 +904,31 @@ static bool iswindowfocus(struct AmigaMonitor *mon) HWND fw = GetForegroundWindow (); HWND w1 = mon->hAmigaWnd; HWND w2 = mon->hMainWnd; - HWND w3 = NULL; -#ifdef RETROPLATFORM - if (rp_isactive ()) - w3 = rp_getparent (); -#endif + if (f != w1 && f != w2) donotfocus = true; - if (w3 != NULL && f == w3) - donotfocus = false; -#if 0 + + + //write_log(_T("f=%p fw=%p w1=%p w2=%p\n"), f, fw, w1, w2); + #ifdef RETROPLATFORM - if (rp_isactive () && isfullscreen () == 0) - donotfocus = false; -#endif + if (rp_isactive()) { + HWND hGuestParent = rp_getparent(); + DWORD dwHostProcessId; + GetWindowThreadProcessId(hGuestParent, &dwHostProcessId); + if (fw) { + DWORD dwForegroundProcessId = 0; + GetWindowThreadProcessId(fw, &dwForegroundProcessId); + + //write_log(_T("dwForegroundProcessId=%p dwHostProcessId=%p\n"), dwForegroundProcessId, dwHostProcessId); + + if (dwForegroundProcessId == dwHostProcessId) { + donotfocus = false; + } + } + } #endif + if (isfullscreen () > 0) donotfocus = false; return donotfocus == false; diff --git a/od-win32/win32.h b/od-win32/win32.h index 88e87df2..ee1600bb 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -15,7 +15,7 @@ #define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100) #define GETBDD(x) ((x) % 100) -#define WINUAEPUBLICBETA 1 +#define WINUAEPUBLICBETA 0 #define LANG_DLL 1 #define LANG_DLL_FULL_VERSION_MATCH 0 @@ -25,7 +25,7 @@ #define WINUAEBETA _T("") #endif -#define WINUAEDATE MAKEBD(2018, 7, 14) +#define WINUAEDATE MAKEBD(2018, 7, 16) //#define WINUAEEXTRA _T("AmiKit Preview") //#define WINUAEEXTRA _T("Amiga Forever Edition") diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index c8acdfa4..f2cfe168 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -6958,7 +6958,7 @@ static void enable_for_displaydlg (HWND hDlg) ew(hDlg, IDC_SCREENMODE_NATIVE3, FALSE); hide(hDlg, IDC_SCREENMODE_NATIVE3, TRUE); } -#ifdef WINUAEPUBLICBETA +#if WINUAEPUBLICBETA hide(hDlg, IDC_DISPLAY_VARSYNC, FALSE); #endif } diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 93868e98..eadde8bf 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,4 +1,6 @@ +4.0.1 + Beta 6: - Statefiles now include full relative and absolute path (disks, harddrives etc), now supports restoring statefile paths correctly even if relative path mode changed between save and restore. Old versions ignore new fields, old statefiles work like previously. diff --git a/od-win32/wix/Product.wxs b/od-win32/wix/Product.wxs index 0c4846c2..3c095505 100644 --- a/od-win32/wix/Product.wxs +++ b/od-win32/wix/Product.wxs @@ -2,8 +2,8 @@ - - + +