Module: wine
Branch: master
Commit: b87bd5e9b0f9536e78254c877bd333d46d151509
URL: https://gitlab.winehq.org/wine/wine/-/commit/b87bd5e9b0f9536e78254c877bd333…
Author: Alex Henrie <alexhenrie24(a)gmail.com>
Date: Sun Jan 28 00:16:14 2024 -0700
krnl386: Emulate the VGA status register.
Sega Bug uses it as a timer.
---
dlls/krnl386.exe16/ioports.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/krnl386.exe16/ioports.c b/dlls/krnl386.exe16/ioports.c
index 7f795c2badf..dc188fabecf 100644
--- a/dlls/krnl386.exe16/ioports.c
+++ b/dlls/krnl386.exe16/ioports.c
@@ -316,6 +316,9 @@ DWORD DOSVM_inport( int port, int size )
case 0x201:
res = ~0U; /* no joystick */
break;
+ case 0x3da:
+ res = GetTickCount() % 17 == 0 ? 0x4 : 0; /* report vblank about 60 times per second */
+ break;
default:
WARN("Direct I/O read attempted from port %x\n", port);
break;
Module: wine
Branch: master
Commit: fe1f3e277d25b299c8c526c3d706a38fbde24e11
URL: https://gitlab.winehq.org/wine/wine/-/commit/fe1f3e277d25b299c8c526c3d706a3…
Author: Alexandros Frantzis <alexandros.frantzis(a)collabora.com>
Date: Fri Jan 26 09:45:14 2024 +0200
winewayland.drv: Track and apply latest window cursor on pointer enter.
Keep track of the window cursor set for each surface and apply it when
the pointer enters the corresponding surface. This fixes a problem where
due to transient disagreements between win32 pointer focus and Wayland
pointer focus a cursor update may be lost. For example:
1. Assume existing cursor C1.
2. Window is created beneath cursor.
3. The SetCursor(hwnd, C2) driver callback is called, but because the
wl_pointer hasn't entered the Wayland surface yet we don't update
the wl_pointer cursor.
4. wl_pointer enters the surface, we apply the latest cursor we know
about, which is C1.
5. Since no change in cursor window occurs, we don't get any
further SetCursor(hwnd, C2) callbacks, so we get stuck with C1.
This commit fixes the problem by tracking the per-surface HCURSOR in
step 3, regardless of whether the cursor is actually applied. So, in
step 4 we can use that HCURSOR for the surface.
This change also fixes some cases of our mouselook heuristics not
kicking in properly due to missing a SetCursor(hwnd, NULL) in the
manner described above.
---
dlls/winewayland.drv/wayland_pointer.c | 3 +++
dlls/winewayland.drv/waylanddrv.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/dlls/winewayland.drv/wayland_pointer.c b/dlls/winewayland.drv/wayland_pointer.c
index fad75c8506c..54dd7931b6e 100644
--- a/dlls/winewayland.drv/wayland_pointer.c
+++ b/dlls/winewayland.drv/wayland_pointer.c
@@ -670,6 +670,9 @@ static void wayland_set_cursor(HWND hwnd, HCURSOR hcursor, BOOL use_hcursor)
if ((surface = wayland_surface_lock_hwnd(hwnd)))
{
scale = surface->window.scale;
+ if (use_hcursor) surface->hcursor = hcursor;
+ else hcursor = surface->hcursor;
+ use_hcursor = TRUE;
pthread_mutex_unlock(&surface->mutex);
}
else
diff --git a/dlls/winewayland.drv/waylanddrv.h b/dlls/winewayland.drv/waylanddrv.h
index 0883c43f1ff..f030f6fc6a0 100644
--- a/dlls/winewayland.drv/waylanddrv.h
+++ b/dlls/winewayland.drv/waylanddrv.h
@@ -201,6 +201,7 @@ struct wayland_surface
struct wayland_window_config window;
struct wayland_client_surface *client;
int buffer_width, buffer_height;
+ HCURSOR hcursor;
};
struct wayland_shm_buffer