From 4e692b5301c683fef8fc203eda008be7f04b5871 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Thu, 28 May 2020 08:46:43 +1000 Subject: [PATCH] Rebase against e48fabff525061c8eea9558084a97308cebe6b7b. --- ...user32-Improve-GetKeyboardLayoutList.patch | 18 ++++---- ...oskrnl.exe-Add-KeGenericCallDpc-stub.patch | 43 ------------------ ...-Add-KeSignalCallDpcSynchronize-stub.patch | 44 ------------------- ...rnl.exe-Add-KeSignalCallDpcDone-stub.patch | 43 ------------------ patches/patchinstall.sh | 22 +--------- ...w-to-select-default-display-frequenc.patch | 34 ++++++++------ staging/upstream-commit | 2 +- 7 files changed, 31 insertions(+), 175 deletions(-) delete mode 100644 patches/ntoskrnl.exe-KeGenericCallDpc/0001-ntoskrnl.exe-Add-KeGenericCallDpc-stub.patch delete mode 100644 patches/ntoskrnl.exe-KeGenericCallDpc/0002-ntoskrnl.exe-Add-KeSignalCallDpcSynchronize-stub.patch delete mode 100644 patches/ntoskrnl.exe-KeGenericCallDpc/0003-ntoskrnl.exe-Add-KeSignalCallDpcDone-stub.patch diff --git a/patches/loader-KeyboardLayouts/0002-user32-Improve-GetKeyboardLayoutList.patch b/patches/loader-KeyboardLayouts/0002-user32-Improve-GetKeyboardLayoutList.patch index d677efe6..bf6e6bc1 100644 --- a/patches/loader-KeyboardLayouts/0002-user32-Improve-GetKeyboardLayoutList.patch +++ b/patches/loader-KeyboardLayouts/0002-user32-Improve-GetKeyboardLayoutList.patch @@ -1,4 +1,4 @@ -From 7bb09137aab184c1c2a36c1be27f6d8105ce2a11 Mon Sep 17 00:00:00 2001 +From 440f90abdcbe7e9a1d43e06900a4674e6fabd805 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Tue, 9 Jul 2019 14:13:28 +1000 Subject: [PATCH] user32: Improve GetKeyboardLayoutList @@ -11,10 +11,10 @@ not the complete list from the registry. 2 files changed, 35 insertions(+), 27 deletions(-) diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c -index 921ea2c962d..953eec47dea 100644 +index 6d916c7d65d..b9e0dc60e7c 100644 --- a/dlls/user32/driver.c +++ b/dlls/user32/driver.c -@@ -213,12 +213,9 @@ static SHORT CDECL nulldrv_GetAsyncKeyState( INT key ) +@@ -210,12 +210,9 @@ static void CDECL nulldrv_Beep(void) static UINT CDECL nulldrv_GetKeyboardLayoutList( INT size, HKL *layouts ) { @@ -27,7 +27,7 @@ index 921ea2c962d..953eec47dea 100644 baselayout = GetUserDefaultLCID(); langid = PRIMARYLANGID(LANGIDFROMLCID(baselayout)); -@@ -227,30 +224,6 @@ static UINT CDECL nulldrv_GetKeyboardLayoutList( INT size, HKL *layouts ) +@@ -224,30 +221,6 @@ static UINT CDECL nulldrv_GetKeyboardLayoutList( INT size, HKL *layouts ) else baselayout |= baselayout << 16; @@ -59,11 +59,11 @@ index 921ea2c962d..953eec47dea 100644 if (baselayout != 0) { diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c -index 1e6be311eeb..1653c07b20b 100644 +index 913fabfbd85..dd84ff5cbb2 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c -@@ -2990,6 +2990,40 @@ static void test_GetPointerType(void) - ok(type == PT_MOUSE, " type %d\n", type ); +@@ -3010,6 +3010,40 @@ static void test_UnregisterDeviceNotification(void) + ok(ret == FALSE, "Unregistering NULL Device Notification returned: %d\n", ret); } +static void test_GetKeyboardLayoutList(void) @@ -103,7 +103,7 @@ index 1e6be311eeb..1653c07b20b 100644 START_TEST(input) { POINT pos; -@@ -3013,6 +3047,7 @@ START_TEST(input) +@@ -3033,6 +3067,7 @@ START_TEST(input) test_GetKeyState(); test_OemKeyScan(); test_GetRawInputData(); @@ -112,5 +112,5 @@ index 1e6be311eeb..1653c07b20b 100644 if(pGetMouseMovePointsEx) -- -2.24.0.rc1 +2.26.2 diff --git a/patches/ntoskrnl.exe-KeGenericCallDpc/0001-ntoskrnl.exe-Add-KeGenericCallDpc-stub.patch b/patches/ntoskrnl.exe-KeGenericCallDpc/0001-ntoskrnl.exe-Add-KeGenericCallDpc-stub.patch deleted file mode 100644 index 44f65169..00000000 --- a/patches/ntoskrnl.exe-KeGenericCallDpc/0001-ntoskrnl.exe-Add-KeGenericCallDpc-stub.patch +++ /dev/null @@ -1,43 +0,0 @@ -From e0a55bd9cf9edea9074852bbb3f359e361aa3c19 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sun, 24 May 2020 10:05:24 +1000 -Subject: [PATCH] ntoskrnl.exe: Add KeGenericCallDpc stub - -Wine-bug:https://bugs.winehq.org/show_bug.cgi?id=49224 -Signed-off-by: Alistair Leslie-Hughes ---- - dlls/ntoskrnl.exe/ntoskrnl.c | 8 ++++++++ - dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 1 + - 2 files changed, 9 insertions(+) - -diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c -index 6e7751d26016..7ad7d929e933 100644 ---- a/dlls/ntoskrnl.exe/ntoskrnl.c -+++ b/dlls/ntoskrnl.exe/ntoskrnl.c -@@ -3999,3 +3999,11 @@ BOOLEAN WINAPI KdRefreshDebuggerNotPresent(void) - - return !KdDebuggerEnabled; - } -+ -+/*********************************************************************** -+ * KeGenericCallDpc (NTOSKRNL.EXE.@) -+ */ -+void WINAPI KeGenericCallDpc (PKDEFERRED_ROUTINE routine, void *context) -+{ -+ FIXME("routine %p, context %p stub.\n", routine, context); -+} -diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec -index 2c71cdde376c..9176d27e6109 100644 ---- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec -+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec -@@ -547,6 +547,7 @@ - @ stub KeFindConfigurationNextEntry - @ stub KeFlushEntireTb - @ stdcall KeFlushQueuedDpcs() -+@ stdcall KeGenericCallDpc(ptr ptr) - @ stdcall KeGetCurrentThread() - @ stub KeGetPreviousMode - @ stub KeGetRecommendedSharedDataAlignment --- -2.26.2 - diff --git a/patches/ntoskrnl.exe-KeGenericCallDpc/0002-ntoskrnl.exe-Add-KeSignalCallDpcSynchronize-stub.patch b/patches/ntoskrnl.exe-KeGenericCallDpc/0002-ntoskrnl.exe-Add-KeSignalCallDpcSynchronize-stub.patch deleted file mode 100644 index ffa1eaa9..00000000 --- a/patches/ntoskrnl.exe-KeGenericCallDpc/0002-ntoskrnl.exe-Add-KeSignalCallDpcSynchronize-stub.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 2b2c07cf76724bdf3eb9cf18ba7f3ac82e20dbf9 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sun, 24 May 2020 10:09:05 +1000 -Subject: [PATCH 2/3] ntoskrnl.exe: Add KeSignalCallDpcSynchronize stub - -Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49224 -Signed-off-by: Alistair Leslie-Hughes ---- - dlls/ntoskrnl.exe/ntoskrnl.c | 9 +++++++++ - dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 1 + - 2 files changed, 10 insertions(+) - -diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c -index 3975e47ddb08..da20023c968a 100644 ---- a/dlls/ntoskrnl.exe/ntoskrnl.c -+++ b/dlls/ntoskrnl.exe/ntoskrnl.c -@@ -4018,3 +4018,12 @@ void WINAPI KeGenericCallDpc (PKDEFERRED_ROUTINE routine, void *context) - { - FIXME("routine %p, context %p stub.\n", routine, context); - } -+ -+/*********************************************************************** -+ * KeSignalCallDpcSynchronize (NTOSKRNL.EXE.@) -+ */ -+BOOLEAN WINAPI KeSignalCallDpcSynchronize (void *argument) -+{ -+ FIXME("argument %p stub.\n", argument); -+ return TRUE; -+} -diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec -index d35eb7c60a40..bf73b1fe85d0 100644 ---- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec -+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec -@@ -641,6 +641,7 @@ - @ stub KeSetTimeIncrement - @ stub KeSetTimer - @ stdcall KeSetTimerEx(ptr int64 long ptr) -+@ stdcall KeSignalCallDpcSynchronize(ptr) - @ stub KeStackAttachProcess - @ stub KeSynchronizeExecution - @ stub KeTerminateThread --- -2.26.2 - diff --git a/patches/ntoskrnl.exe-KeGenericCallDpc/0003-ntoskrnl.exe-Add-KeSignalCallDpcDone-stub.patch b/patches/ntoskrnl.exe-KeGenericCallDpc/0003-ntoskrnl.exe-Add-KeSignalCallDpcDone-stub.patch deleted file mode 100644 index 0ca72eca..00000000 --- a/patches/ntoskrnl.exe-KeGenericCallDpc/0003-ntoskrnl.exe-Add-KeSignalCallDpcDone-stub.patch +++ /dev/null @@ -1,43 +0,0 @@ -From b9b9339169c796a555a69c9833eb5b6976bf80ba Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sun, 24 May 2020 10:12:28 +1000 -Subject: [PATCH 3/3] ntoskrnl.exe: Add KeSignalCallDpcDone stub - -Signed-off-by: Alistair Leslie-Hughes ---- - dlls/ntoskrnl.exe/ntoskrnl.c | 8 ++++++++ - dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 1 + - 2 files changed, 9 insertions(+) - -diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c -index da20023c968a..2b2169729667 100644 ---- a/dlls/ntoskrnl.exe/ntoskrnl.c -+++ b/dlls/ntoskrnl.exe/ntoskrnl.c -@@ -4027,3 +4027,11 @@ BOOLEAN WINAPI KeSignalCallDpcSynchronize (void *argument) - FIXME("argument %p stub.\n", argument); - return TRUE; - } -+ -+/*********************************************************************** -+ * KeSignalCallDpcDone (NTOSKRNL.EXE.@) -+ */ -+void WINAPI KeSignalCallDpcDone (void *argument) -+{ -+ FIXME("argument %p stub.\n", argument); -+} -\ No newline at end of file -diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec -index bf73b1fe85d0..483f5657a4be 100644 ---- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec -+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec -@@ -641,6 +641,7 @@ - @ stub KeSetTimeIncrement - @ stub KeSetTimer - @ stdcall KeSetTimerEx(ptr int64 long ptr) -+@ stdcall KeSignalCallDpcDone(ptr) - @ stdcall KeSignalCallDpcSynchronize(ptr) - @ stub KeStackAttachProcess - @ stub KeSynchronizeExecution --- -2.26.2 - diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 07e66faf..8fd37ebc 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "8257fe88fb99ca0bdeec27b47b7cf835bda5c061" + echo "e48fabff525061c8eea9558084a97308cebe6b7b" } # Show version information @@ -213,7 +213,6 @@ patch_enable_all () enable_ntdll_set_full_cpu_context="$1" enable_ntdll_x86_64_SegDs="$1" enable_ntoskrnl_Stubs="$1" - enable_ntoskrnl_exe_KeGenericCallDpc="$1" enable_nvapi_Stub_DLL="$1" enable_nvcuda_CUDA_Support="$1" enable_nvcuvid_CUDA_Video_Support="$1" @@ -743,9 +742,6 @@ patch_enable () ntoskrnl-Stubs) enable_ntoskrnl_Stubs="$2" ;; - ntoskrnl.exe-KeGenericCallDpc) - enable_ntoskrnl_exe_KeGenericCallDpc="$2" - ;; nvapi-Stub_DLL) enable_nvapi_Stub_DLL="$2" ;; @@ -4955,22 +4951,6 @@ if test "$enable_ntoskrnl_Stubs" -eq 1; then ) >> "$patchlist" fi -# Patchset ntoskrnl.exe-KeGenericCallDpc -# | -# | Modified files: -# | * dlls/ntoskrnl.exe/ntoskrnl.c, dlls/ntoskrnl.exe/ntoskrnl.exe.spec -# | -if test "$enable_ntoskrnl_exe_KeGenericCallDpc" -eq 1; then - patch_apply ntoskrnl.exe-KeGenericCallDpc/0001-ntoskrnl.exe-Add-KeGenericCallDpc-stub.patch - patch_apply ntoskrnl.exe-KeGenericCallDpc/0002-ntoskrnl.exe-Add-KeSignalCallDpcSynchronize-stub.patch - patch_apply ntoskrnl.exe-KeGenericCallDpc/0003-ntoskrnl.exe-Add-KeSignalCallDpcDone-stub.patch - ( - printf '%s\n' '+ { "Alistair Leslie-Hughes", "ntoskrnl.exe: Add KeGenericCallDpc stub.", 1 },'; - printf '%s\n' '+ { "Alistair Leslie-Hughes", "ntoskrnl.exe: Add KeSignalCallDpcSynchronize stub.", 1 },'; - printf '%s\n' '+ { "Alistair Leslie-Hughes", "ntoskrnl.exe: Add KeSignalCallDpcDone stub.", 1 },'; - ) >> "$patchlist" -fi - # Patchset nvcuvid-CUDA_Video_Support # | # | This patchset has the following (direct or indirect) dependencies: diff --git a/patches/winex11-DefaultDisplayFrequency/0001-winex11.drv-Allow-to-select-default-display-frequenc.patch b/patches/winex11-DefaultDisplayFrequency/0001-winex11.drv-Allow-to-select-default-display-frequenc.patch index 39d50c99..401f0890 100644 --- a/patches/winex11-DefaultDisplayFrequency/0001-winex11.drv-Allow-to-select-default-display-frequenc.patch +++ b/patches/winex11-DefaultDisplayFrequency/0001-winex11.drv-Allow-to-select-default-display-frequenc.patch @@ -1,8 +1,8 @@ -From 599864f0a90e7bf64902dbd7ff135f253d270802 Mon Sep 17 00:00:00 2001 +From df6fb4c8cee4e6cf8223ca065234749dec3cfbaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 5 Nov 2015 14:33:48 +0100 -Subject: winex11.drv: Allow to select default display frequency in registry - key. +Subject: [PATCH] winex11.drv: Allow to select default display frequency in + registry key. When an application doesn't request a specific display frequency, Wine currently just picks the first one. Most of the time this is fine, but @@ -17,21 +17,27 @@ HKCU\Software\Wine\X11 Driver\DefaultDisplayFrequency 3 files changed, 43 insertions(+), 20 deletions(-) diff --git a/dlls/winex11.drv/settings.c b/dlls/winex11.drv/settings.c -index 24644db62..4fac4beb6 100644 +index 70ce35361b6..cada9cd5df2 100644 --- a/dlls/winex11.drv/settings.c +++ b/dlls/winex11.drv/settings.c -@@ -319,8 +319,9 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, - HWND hwnd, DWORD flags, LPVOID lpvoid ) - { +@@ -348,7 +348,7 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, + WCHAR primary_adapter[CCHDEVICENAME]; char bpp_buffer[16], freq_buffer[18]; + DEVMODEW default_mode; - DWORD i; + DWORD i, mode; + if (!get_primary_adapter(primary_adapter)) + return DISP_CHANGE_FAILED; +@@ -379,6 +379,7 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, + return DISP_CHANGE_SUCCESSFUL; + } + + mode = ENUM_CURRENT_SETTINGS; for (i = 0; i < dd_mode_count; i++) { if (devmode->dmFields & DM_BITSPERPEL) -@@ -338,32 +339,49 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, +@@ -396,32 +397,49 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, if (devmode->dmPelsHeight != dd_modes[i].height) continue; } @@ -101,10 +107,10 @@ index 24644db62..4fac4beb6 100644 + return DISP_CHANGE_SUCCESSFUL; } diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h -index 98cab8947..9f76596e4 100644 +index 803e3e4103e..6dfe4a35f6b 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h -@@ -404,6 +404,7 @@ extern BOOL private_color_map DECLSPEC_HIDDEN; +@@ -403,6 +403,7 @@ extern BOOL private_color_map DECLSPEC_HIDDEN; extern int primary_monitor DECLSPEC_HIDDEN; extern int copy_default_colors DECLSPEC_HIDDEN; extern int alloc_system_colors DECLSPEC_HIDDEN; @@ -113,10 +119,10 @@ index 98cab8947..9f76596e4 100644 extern HMODULE x11drv_module DECLSPEC_HIDDEN; extern char *process_name DECLSPEC_HIDDEN; diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c -index 4f611f5fa..981bcc6fb 100644 +index 0732aaa1113..ee8de0a3830 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c -@@ -86,6 +86,7 @@ BOOL client_side_with_render = TRUE; +@@ -85,6 +85,7 @@ BOOL client_side_with_render = TRUE; BOOL shape_layered_windows = TRUE; int copy_default_colors = 128; int alloc_system_colors = 256; @@ -124,7 +130,7 @@ index 4f611f5fa..981bcc6fb 100644 DWORD thread_data_tls_index = TLS_OUT_OF_INDEXES; int xrender_error_base = 0; HMODULE x11drv_module = 0; -@@ -436,6 +437,9 @@ static void setup_options(void) +@@ -437,6 +438,9 @@ static void setup_options(void) if (!get_config_key( hkey, appkey, "AllocSystemColors", buffer, sizeof(buffer) )) alloc_system_colors = atoi(buffer); @@ -135,5 +141,5 @@ index 4f611f5fa..981bcc6fb 100644 if (appkey) RegCloseKey( appkey ); -- -2.25.0 +2.26.2 diff --git a/staging/upstream-commit b/staging/upstream-commit index 58b6cfef..b747f91e 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -8257fe88fb99ca0bdeec27b47b7cf835bda5c061 +e48fabff525061c8eea9558084a97308cebe6b7b