]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
4100b13
authorToni Wilen <twilen@winuae.net>
Tue, 4 Dec 2018 19:06:48 +0000 (21:06 +0200)
committerToni Wilen <twilen@winuae.net>
Tue, 4 Dec 2018 19:06:48 +0000 (21:06 +0200)
od-win32/rp.cpp
od-win32/win32.h
od-win32/winuaechangelog.txt

index 7197500c4f225a008ec4c33b70af3e12bae4b067..f8c2821689e0a3554ebb40b5a007084e62f61fa5 100644 (file)
@@ -65,6 +65,7 @@ static HWND guestwindow;
 static int hwndset_delay;
 static int sendmouseevents;
 static int mouseevent_x, mouseevent_y, mouseevent_buttons;
+static uae_u64 delayed_refresh;
 
 static int cando (void)
 {
@@ -77,6 +78,20 @@ static int isrecursive (void)
        return recursive_device;
 }
 
+static uae_u64 gett(void)
+{
+       SYSTEMTIME st;
+       FILETIME ft;
+       ULARGE_INTEGER li;
+
+       GetSystemTime(&st);
+       if (!SystemTimeToFileTime(&st, &ft))
+               return 0;
+       li.LowPart = ft.dwLowDateTime;
+       li.HighPart = ft.dwHighDateTime;
+       return li.QuadPart / 10000;
+}
+
 static void outhex (const uae_u8 *s)
 {
        for (;;) {
@@ -1187,8 +1202,9 @@ static int movescreenoverlay(WPARAM wParam, LPARAM lParam)
        eo.xpos = LOWORD(lParam);
        eo.ypos = HIWORD(lParam);
        int ret = D3D_extoverlay(&eo);
-       if (pause_emulation) {
+       if (pause_emulation && D3D_refresh) {
                D3D_refresh(0);
+               delayed_refresh = 0;
        }
        return ret;
 }
@@ -1198,14 +1214,11 @@ static int deletescreenoverlay(WPARAM wParam)
        struct extoverlay eo = { 0 };
        if (!D3D_extoverlay)
                return 0;
+       delayed_refresh = gett();
        eo.idx = wParam;
        eo.width = -1;
        eo.height = -1;
-       int ret = D3D_extoverlay(&eo);
-       if (pause_emulation) {
-               D3D_refresh(0);
-       }
-       return ret;
+       return D3D_extoverlay(&eo);
 }
 
 static int screenoverlay(LPCVOID pData)
@@ -1216,17 +1229,14 @@ static int screenoverlay(LPCVOID pData)
                return 0;
        if (rpo->dwFormat != RPSOPF_32BIT_BGRA)
                return 0;
+       delayed_refresh = gett();
        eo.idx = rpo->dwIndex;
        eo.xpos = rpo->lLeft;
        eo.ypos = rpo->lTop;
        eo.width = rpo->lWidth;
        eo.height = rpo->lHeight;
        eo.data = rpo->btData;
-       int ret = D3D_extoverlay(&eo);
-       if (pause_emulation) {
-               D3D_refresh(0);
-       }
-       return ret;
+       return D3D_extoverlay(&eo);
 }
 
 static LRESULT CALLBACK RPHostMsgFunction2 (UINT uMessage, WPARAM wParam, LPARAM lParam,
@@ -1401,6 +1411,7 @@ static LRESULT CALLBACK RPHostMsgFunction2 (UINT uMessage, WPARAM wParam, LPARAM
                                save_state (s, _T("AmigaForever"));
                                ret = 1;
                        } else {
+                               write_log(_T("RP_IPC_TO_GUEST_SAVESTATE unsupported emulation state\n"));
                                //savestate_initsave (s, 1, TRUE);
                                //ret = -1;
                        }
@@ -1458,9 +1469,8 @@ static LRESULT CALLBACK RPHostMsgFunction2 (UINT uMessage, WPARAM wParam, LPARAM
        case RP_IPC_TO_GUEST_SENDMOUSEEVENTS:
                sendmouseevents = wParam;
                if (sendmouseevents) {
-                       LRESULT lr = NULL;
                        LPARAM lp = MAKELONG(mouseevent_x, mouseevent_y);
-                       RPSendMessage(RP_IPC_TO_HOST_MOUSEMOVE, 0, lp, NULL, 0, &guestinfo, &lr);
+                       RPPostMessagex(RP_IPC_TO_HOST_MOUSEMOVE, 0, lp, &guestinfo);
                }
                return 1;
        }
@@ -2100,25 +2110,19 @@ void rp_rtg_switch (void)
 static uae_u64 esctime;
 static int releasetime, releasenum;
 
-static uae_u64 gett (void)
-{
-       SYSTEMTIME st;
-       FILETIME ft;
-       ULARGE_INTEGER li;
-
-       GetSystemTime (&st);
-       if (!SystemTimeToFileTime (&st, &ft))
-               return 0;
-       li.LowPart = ft.dwLowDateTime;
-       li.HighPart = ft.dwHighDateTime;
-       return li.QuadPart / 10000;
-}
-
-void rp_vsync (void)
+void rp_vsync(void)
 {
        struct AmigaMonitor *mon = &AMonitors[0];
        if (!initialized)
                return;
+       if (delayed_refresh) {
+               if (gett() >= delayed_refresh + 50) {
+                       if (pause_emulation && D3D_refresh) {
+                               D3D_refresh(0);
+                       }
+                       delayed_refresh = 0;
+               }
+       }
        if (hwndset_delay > 0) {
                hwndset_delay--;
                if (hwndset_delay == 0)
@@ -2249,10 +2253,9 @@ bool rp_mouseevent(int x, int y, int buttons, int buttonmask)
                }
                return false;
        }
-       LRESULT lr;
        if (x > -30000 && y > -30000 && (x != mouseevent_x || y != mouseevent_y)) {
                LPARAM lParam = MAKELONG(x, y);
-               RPSendMessage(RP_IPC_TO_HOST_MOUSEMOVE, 0, lParam, NULL, 0, &guestinfo, &lr);
+               RPPostMessagex(RP_IPC_TO_HOST_MOUSEMOVE, 0, lParam, &guestinfo);
                mouseevent_x = x;
                mouseevent_y = y;
        }
@@ -2260,7 +2263,7 @@ bool rp_mouseevent(int x, int y, int buttons, int buttonmask)
                LPARAM lParam = MAKELONG(mouseevent_x, mouseevent_y);
                mouseevent_buttons &= ~buttonmask;
                mouseevent_buttons |= buttons & buttonmask;
-               RPSendMessage(RP_IPC_TO_HOST_MOUSEBUTTON, mouseevent_buttons, lParam, NULL, 0, &guestinfo, &lr);
+               RPPostMessagex(RP_IPC_TO_HOST_MOUSEBUTTON, mouseevent_buttons, lParam, &guestinfo);
        }
        return true;
 }
index 77099902791ccff418b8475907c43970f450eb20..b6b69c499d827e24fa590daef3c644c2c3653b6e 100644 (file)
@@ -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 1
 
@@ -25,7 +25,7 @@
 #define WINUAEBETA _T("")
 #endif
 
-#define WINUAEDATE MAKEBD(2018, 12, 2)
+#define WINUAEDATE MAKEBD(2018, 12, 4)
 
 //#define WINUAEEXTRA _T("AmiKit Preview")
 //#define WINUAEEXTRA _T("Amiga Forever Edition")
index e3db0bb68a2bb0fd38c05718c5e76bf6d2f80242..5a4a0c37a9ac36d27525949180d25927eb861006 100644 (file)
@@ -1,4 +1,9 @@
 \r
+\r
+- Hardware emulated graphics board interrupt was not emulated when gfxboard mode was not (yet) active and refresh mode was not "chipset". (For example Picasso96 + PicassoII+ or PicassoIV hang when switching to gfxboard mode)\r
+- cdimageX config entries didn't support ejecting CD using uae-configuration. Now empty string ejects the CD. String "empty" and dot also equals empty.\r
+- floppyX config entries also supports dot as empty drive.\r
+\r
 Beta 12:\r
 \r
 - If tablet.library was ticked and config was loaded to system without tablet, it was not possible to untick it.\r