Rebase against 1932c3a2516b181291ce430505dcfa8a82eb70bd.

This commit is contained in:
Alistair Leslie-Hughes 2024-01-18 10:40:12 +11:00
parent cab93f47b8
commit 19c6bb12cc
5 changed files with 60 additions and 74 deletions

View File

@ -1,4 +1,4 @@
From f1dba65707a5a8ef5ec2d9c8213134b01cd735e2 Mon Sep 17 00:00:00 2001
From 0a5214d0fe032778fa3ca4ee60c3d2ba64f8f4c0 Mon Sep 17 00:00:00 2001
From: Matthew Wong <itsmattkc@gmail.com>
Date: Fri, 18 Sep 2020 00:47:13 +0000
Subject: [PATCH] ddraw: Implement Pick() and GetPickRecords().
@ -33,14 +33,14 @@ Signed-off-by: Myah Caron <qsniyg@protonmail.com>
dlls/ddraw/ddraw_private.h | 7 +-
dlls/ddraw/device.c | 67 ++++++++++++--
dlls/ddraw/executebuffer.c | 176 ++++++++++++++++++++++++++++++++++++-
dlls/ddraw/tests/ddraw1.c | 131 +++++++++++++++++++++++++++
4 files changed, 371 insertions(+), 10 deletions(-)
dlls/ddraw/tests/ddraw1.c | 133 ++++++++++++++++++++++++++++
4 files changed, 373 insertions(+), 10 deletions(-)
diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h
index 01a9579651c..889a64219e5 100644
index 6fc93b91860..c90b894ea61 100644
--- a/dlls/ddraw/ddraw_private.h
+++ b/dlls/ddraw/ddraw_private.h
@@ -336,6 +336,11 @@ struct d3d_device
@@ -338,6 +338,11 @@ struct d3d_device
struct d3d_viewport *current_viewport;
D3DVIEWPORT7 active_viewport;
@ -52,7 +52,7 @@ index 01a9579651c..889a64219e5 100644
/* Required to keep track which of two available texture blending modes in d3ddevice3 is used */
BOOL legacyTextureBlending;
D3DTEXTUREBLEND texture_map_blend;
@@ -569,7 +574,7 @@ struct d3d_execute_buffer *unsafe_impl_from_IDirect3DExecuteBuffer(IDirect3DExec
@@ -571,7 +576,7 @@ struct d3d_execute_buffer *unsafe_impl_from_IDirect3DExecuteBuffer(IDirect3DExec
/* The execute function */
HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *execute_buffer,
@ -62,7 +62,7 @@ index 01a9579651c..889a64219e5 100644
/*****************************************************************************
* IDirect3DVertexBuffer
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 80556e96787..b3b63d7b361 100644
index bc1d91ee00b..82a813f9064 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -349,6 +349,9 @@ static ULONG WINAPI d3d_device_inner_Release(IUnknown *iface)
@ -172,7 +172,7 @@ index 80556e96787..b3b63d7b361 100644
return D3D_OK;
}
diff --git a/dlls/ddraw/executebuffer.c b/dlls/ddraw/executebuffer.c
index 13e639eda3f..bb050fe16b8 100644
index 320ce6649d4..84366dafd7d 100644
--- a/dlls/ddraw/executebuffer.c
+++ b/dlls/ddraw/executebuffer.c
@@ -45,15 +45,106 @@ static void _dump_D3DEXECUTEBUFFERDESC(const D3DEXECUTEBUFFERDESC *lpDesc) {
@ -387,10 +387,10 @@ index 13e639eda3f..bb050fe16b8 100644
static inline struct d3d_execute_buffer *impl_from_IDirect3DExecuteBuffer(IDirect3DExecuteBuffer *iface)
{
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
index f5fc7b04053..b6374e75632 100644
index d8fcb188c40..bacd9049d6e 100644
--- a/dlls/ddraw/tests/ddraw1.c
+++ b/dlls/ddraw/tests/ddraw1.c
@@ -15429,6 +15429,136 @@ static void test_enum_devices(void)
@@ -15467,6 +15467,137 @@ static void test_enum_devices(void)
ok(!refcount, "Device has %lu references left.\n", refcount);
}
@ -521,13 +521,22 @@ index f5fc7b04053..b6374e75632 100644
+ IDirect3DExecuteBuffer_Release(execute_buffer);
+ IDirect3DDevice_Release(device);
+ IDirectDraw_Release(ddraw);
+
+ DestroyWindow(window);
+}
+
START_TEST(ddraw1)
{
DDDEVICEIDENTIFIER identifier;
@@ -15545,6 +15675,7 @@ START_TEST(ddraw1)
/* Emperor: Rise of the Middle Kingdom locks a sysmem surface and then accesses
* the pointer after unlocking it. This test roughly replicates the calls that
* it makes. */
@@ -15527,6 +15658,7 @@ static void test_pinned_sysmem(void)
IDirectDrawSurface_Release(surface);
refcount = IDirectDraw_Release(ddraw);
ok(!refcount, "Device has %lu references left.\n", refcount);
+
DestroyWindow(window);
}
@@ -15646,6 +15778,7 @@ START_TEST(ddraw1)
test_vtbl_protection();
test_window_position();
test_get_display_mode();
@ -536,5 +545,5 @@ index f5fc7b04053..b6374e75632 100644
test_filling_convention();
test_enum_devices();
--
2.40.1
2.43.0

View File

@ -1,4 +1,4 @@
From 7dff09756ebc13c38695050b9de271a84c2ea7b6 Mon Sep 17 00:00:00 2001
From b58f3bcfd0aa86fbc308fe3834bdf79c20f84876 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 9 Jul 2019 14:13:28 +1000
Subject: [PATCH] user32: Do not enumerate the registry in
@ -25,10 +25,10 @@ index 8f3cd8acae7..072f1fab23a 100644
{
SendMessageTimeoutW(handle, WM_DEVICECHANGE, flags, (LPARAM)header, SMTO_ABORTIFHUNG, 2000, NULL);
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index 197a82db251..6385ef002b9 100644
index 12fa459205a..12fc2652604 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -5369,6 +5369,40 @@ static void test_ClipCursor( char **argv )
@@ -5401,6 +5401,40 @@ static void test_ClipCursor( char **argv )
if (!EqualRect( &rect, &virtual_rect )) ok_ret( 1, ClipCursor( NULL ) );
}
@ -66,10 +66,10 @@ index 197a82db251..6385ef002b9 100644
+ }
+}
+
START_TEST(input)
{
char **argv;
@@ -5413,6 +5447,7 @@ START_TEST(input)
/* run the tests in a separate desktop to avoid interaction with other
* tests, current desktop state, or user actions. */
static void test_input_desktop( char **argv )
@@ -5464,6 +5498,7 @@ START_TEST(input)
test_GetRawInputBuffer();
test_RegisterRawInputDevices();
test_rawinput(argv[0]);
@ -78,10 +78,10 @@ index 197a82db251..6385ef002b9 100644
if(pGetMouseMovePointsEx)
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c
index 22f371969b9..e0a0bd332ed 100644
index 3ee46f0bfcf..a22cc2397d9 100644
--- a/dlls/win32u/input.c
+++ b/dlls/win32u/input.c
@@ -1257,11 +1257,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
@@ -1282,11 +1282,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
*/
UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
{
@ -94,7 +94,7 @@ index 22f371969b9..e0a0bd332ed 100644
HKL layout;
TRACE_(keyboard)( "size %d, layouts %p.\n", size, layouts );
@@ -1275,33 +1271,6 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
@@ -1300,33 +1296,6 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
if (size && layouts)
{
layouts[count - 1] = layout;
@ -129,5 +129,5 @@ index 22f371969b9..e0a0bd332ed 100644
return count;
--
2.40.1
2.43.0

View File

@ -1,25 +1,25 @@
From 92baf5607eaef9fe15b1da85f4879677504b7e4f Mon Sep 17 00:00:00 2001
From 32b50b0699f61ac8faee5e9be41b8f0fbe31ff9e Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 29 May 2017 06:04:18 +0200
Subject: [PATCH] user32/tests: Add tests for window region of layered windows.
---
dlls/user32/tests/input.c | 70 +++++++++++++++++++++++++++++++++++++++
1 file changed, 70 insertions(+)
dlls/user32/tests/input.c | 72 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 71 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index 233826b5ccd..13107c13e81 100644
index d2043a1553f..bf6377c8c8d 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -86,6 +86,7 @@ static int (WINAPI *pGetMouseMovePointsEx) (UINT, LPMOUSEMOVEPOINT, LPMOUSEMOVEP
@@ -331,6 +331,7 @@ static int (WINAPI *pGetMouseMovePointsEx) (UINT, LPMOUSEMOVEPOINT, LPMOUSEMOVEP
static UINT (WINAPI *pGetRawInputDeviceList) (PRAWINPUTDEVICELIST, PUINT, UINT);
static UINT (WINAPI *pGetRawInputDeviceInfoW) (HANDLE, UINT, void *, UINT *);
static UINT (WINAPI *pGetRawInputDeviceInfoA) (HANDLE, UINT, void *, UINT *);
+static int (WINAPI *pGetWindowRgnBox)(HWND, LPRECT);
static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL);
#define MAXKEYEVENTS 12
@@ -165,6 +166,7 @@ static void init_function_pointers(void)
/**********************adapted from input.c **********************************/
@@ -357,6 +358,7 @@ static void init_function_pointers(void)
GET_PROC(GetRawInputDeviceList);
GET_PROC(GetRawInputDeviceInfoW);
GET_PROC(GetRawInputDeviceInfoA);
@ -27,7 +27,7 @@ index 233826b5ccd..13107c13e81 100644
hdll = GetModuleHandleA("kernel32");
GET_PROC(IsWow64Process);
@@ -2923,6 +2925,9 @@ static void test_Input_mouse(void)
@@ -3857,6 +3859,9 @@ static void test_Input_mouse(void)
DWORD thread_id;
WNDCLASSA wclass;
POINT pt, pt_org;
@ -37,7 +37,16 @@ index 233826b5ccd..13107c13e81 100644
MSG msg;
BOOL ret;
@@ -3161,6 +3166,12 @@ static void test_Input_mouse(void)
@@ -4084,7 +4089,7 @@ static void test_Input_mouse(void)
ok(ReleaseCapture(), "ReleaseCapture failed\n");
wclass.style = 0;
- wclass.lpfnWndProc = WndProc;
+ wclass.lpfnWndProc = static_hook_proc;
wclass.cbClsExtra = 0;
wclass.cbWndExtra = 0;
wclass.hInstance = GetModuleHandleA(NULL);
@@ -4107,6 +4112,12 @@ static void test_Input_mouse(void)
while (wait_for_message(&msg)) DispatchMessageA(&msg);
Sleep(100);
@ -50,7 +59,7 @@ index 233826b5ccd..13107c13e81 100644
got_button_down = got_button_up = FALSE;
simulate_click(TRUE, 150, 150);
while (wait_for_message(&msg))
@@ -3187,6 +3198,12 @@ static void test_Input_mouse(void)
@@ -4133,6 +4144,12 @@ static void test_Input_mouse(void)
while (wait_for_message(&msg)) DispatchMessageA(&msg);
Sleep(100);
@ -63,7 +72,7 @@ index 233826b5ccd..13107c13e81 100644
got_button_down = got_button_up = FALSE;
simulate_click(TRUE, 150, 150);
while (wait_for_message(&msg))
@@ -3215,6 +3232,12 @@ static void test_Input_mouse(void)
@@ -4161,6 +4178,12 @@ static void test_Input_mouse(void)
while (wait_for_message(&msg)) DispatchMessageA(&msg);
Sleep(100);
@ -76,7 +85,7 @@ index 233826b5ccd..13107c13e81 100644
got_button_down = got_button_up = FALSE;
simulate_click(TRUE, 150, 150);
while (wait_for_message(&msg))
@@ -3241,6 +3264,12 @@ static void test_Input_mouse(void)
@@ -4187,6 +4210,12 @@ static void test_Input_mouse(void)
while (wait_for_message(&msg)) DispatchMessageA(&msg);
Sleep(100);
@ -89,7 +98,7 @@ index 233826b5ccd..13107c13e81 100644
got_button_down = got_button_up = FALSE;
simulate_click(TRUE, 150, 150);
while (wait_for_message(&msg))
@@ -3268,6 +3297,12 @@ static void test_Input_mouse(void)
@@ -4214,6 +4243,12 @@ static void test_Input_mouse(void)
while (wait_for_message(&msg)) DispatchMessageA(&msg);
Sleep(100);
@ -102,7 +111,7 @@ index 233826b5ccd..13107c13e81 100644
got_button_down = got_button_up = FALSE;
simulate_click(TRUE, 150, 150);
while (wait_for_message(&msg))
@@ -3289,6 +3324,41 @@ static void test_Input_mouse(void)
@@ -4235,6 +4270,41 @@ static void test_Input_mouse(void)
ok(got_button_down, "expected WM_LBUTTONDOWN message\n");
ok(got_button_up, "expected WM_LBUTTONUP message\n");
@ -145,5 +154,5 @@ index 233826b5ccd..13107c13e81 100644
SetCursorPos(pt_org.x, pt_org.y);
--
2.27.0
2.43.0

View File

@ -1,32 +0,0 @@
From 53c9a5bf8280c3c7aaabcf38344fd743c42c58fc Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 4 Jan 2024 12:27:13 +1100
Subject: [PATCH] include: Add more D3D_FEATURE_LEVEL_ defines
---
include/d3dcommon.idl | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/d3dcommon.idl b/include/d3dcommon.idl
index 7a53a84079d..5ffb4cd5b5b 100644
--- a/include/d3dcommon.idl
+++ b/include/d3dcommon.idl
@@ -100,6 +100,7 @@ typedef enum D3D_DRIVER_TYPE
typedef enum D3D_FEATURE_LEVEL
{
+ D3D_FEATURE_LEVEL_1_0_CORE = 0x1000,
D3D_FEATURE_LEVEL_9_1 = 0x9100,
D3D_FEATURE_LEVEL_9_2 = 0x9200,
D3D_FEATURE_LEVEL_9_3 = 0x9300,
@@ -109,6 +110,7 @@ typedef enum D3D_FEATURE_LEVEL
D3D_FEATURE_LEVEL_11_1 = 0xb100,
D3D_FEATURE_LEVEL_12_0 = 0xc000,
D3D_FEATURE_LEVEL_12_1 = 0xc100,
+ D3D_FEATURE_LEVEL_12_2 = 0xc200,
} D3D_FEATURE_LEVEL;
cpp_quote("#define D3D_FL9_1_REQ_TEXTURE1D_U_DIMENSION 2048")
--
2.43.0

View File

@ -1 +1 @@
fd1153552d779e1ac14b0b1c48fbd1cde894eb0a
1932c3a2516b181291ce430505dcfa8a82eb70bd