diff --git a/patches/dinput-reconnect-joystick/0001-dinput-Allow-reconnecting-to-disconnected-joysticks.patch b/patches/dinput-reconnect-joystick/0001-dinput-Allow-reconnecting-to-disconnected-joysticks.patch index 893f39b6..be932358 100644 --- a/patches/dinput-reconnect-joystick/0001-dinput-Allow-reconnecting-to-disconnected-joysticks.patch +++ b/patches/dinput-reconnect-joystick/0001-dinput-Allow-reconnecting-to-disconnected-joysticks.patch @@ -1,4 +1,4 @@ -From e72af998f5382092726cfdb4d57c3b5f8b7d5401 Mon Sep 17 00:00:00 2001 +From 598845132c5c0b49bb088b6e70a4127bc81924fb Mon Sep 17 00:00:00 2001 From: Andrew Church Date: Mon, 25 Feb 2019 11:23:12 +1100 Subject: [PATCH] dinput: Allow reconnecting to disconnected joysticks @@ -9,7 +9,7 @@ Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=34297 1 file changed, 113 insertions(+), 35 deletions(-) diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c -index b5418d805cc..2434af600ac 100644 +index 14acbb5cd8c..ef7b160ba58 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -84,6 +84,13 @@ struct wine_input_absinfo { @@ -34,7 +34,7 @@ index b5418d805cc..2434af600ac 100644 int dev_axes_to_di[ABS_MAX]; POINTL povs[4]; -@@ -473,6 +481,7 @@ static JoystickImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput, unsig +@@ -468,6 +476,7 @@ static JoystickImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput, unsig newDevice->generic.base.dinput = dinput; newDevice->generic.joy_polldev = joy_polldev; newDevice->joyfd = -1; @@ -42,7 +42,7 @@ index b5418d805cc..2434af600ac 100644 newDevice->joydev = &joydevs[index]; newDevice->generic.name = newDevice->joydev->name; list_init(&newDevice->ff_effects); -@@ -680,38 +689,15 @@ static HRESULT joydev_create_device(IDirectInputImpl *dinput, REFGUID rguid, REF +@@ -675,38 +684,15 @@ static HRESULT joydev_create_device(IDirectInputImpl *dinput, REFGUID rguid, REF return DIERR_DEVICENOTREG; } @@ -85,7 +85,7 @@ index b5418d805cc..2434af600ac 100644 } else { -@@ -726,18 +712,53 @@ static HRESULT WINAPI JoystickWImpl_Acquire(LPDIRECTINPUTDEVICE8W iface) +@@ -721,18 +707,53 @@ static HRESULT WINAPI JoystickWImpl_Acquire(LPDIRECTINPUTDEVICE8W iface) event.type = EV_FF; event.code = FF_GAIN; event.value = This->ff_gain; @@ -141,7 +141,7 @@ index b5418d805cc..2434af600ac 100644 return DI_OK; } -@@ -775,6 +796,7 @@ static HRESULT WINAPI JoystickWImpl_Unacquire(LPDIRECTINPUTDEVICE8W iface) +@@ -764,6 +785,7 @@ static HRESULT WINAPI JoystickWImpl_Unacquire(LPDIRECTINPUTDEVICE8W iface) close(This->joyfd); This->joyfd = -1; @@ -149,9 +149,9 @@ index b5418d805cc..2434af600ac 100644 } return res; } -@@ -819,23 +841,79 @@ static void joy_polldev(LPDIRECTINPUTDEVICE8A iface) +@@ -802,23 +824,79 @@ static void joy_polldev( IDirectInputDevice8W *iface ) struct input_event ie; - JoystickImpl *This = impl_from_IDirectInputDevice8A(iface); + JoystickImpl *This = impl_from_IDirectInputDevice8W( iface ); - if (This->joyfd==-1) - return; @@ -236,5 +236,5 @@ index b5418d805cc..2434af600ac 100644 TRACE("input_event: type %d, code %d, value %d\n",ie.type,ie.code,ie.value); switch (ie.type) { -- -2.17.1 +2.30.2 diff --git a/patches/dinput-remap-joystick/0001-dinput-Allow-remapping-of-joystick-buttons.patch b/patches/dinput-remap-joystick/0001-dinput-Allow-remapping-of-joystick-buttons.patch index cfbc30a4..5d89a883 100644 --- a/patches/dinput-remap-joystick/0001-dinput-Allow-remapping-of-joystick-buttons.patch +++ b/patches/dinput-remap-joystick/0001-dinput-Allow-remapping-of-joystick-buttons.patch @@ -1,4 +1,4 @@ -From bf98a453bb814564ccf848d76d06c4b544cfa998 Mon Sep 17 00:00:00 2001 +From 2c404d618908f4655623611ce720b6b27d0c1de6 Mon Sep 17 00:00:00 2001 From: Andrew Church Date: Mon, 25 Feb 2019 11:21:03 +1100 Subject: [PATCH] dinput: Allow remapping of joystick buttons @@ -18,10 +18,10 @@ Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=35815 5 files changed, 42 insertions(+), 2 deletions(-) diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c -index 0ec1ceb..b8b0027 100644 +index 2354ff3b822..36086f0035f 100644 --- a/dlls/dinput/joystick.c +++ b/dlls/dinput/joystick.c -@@ -950,6 +950,7 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_ +@@ -1034,6 +1034,7 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_ int tokens = 0; int axis = 0; int pov = 0; @@ -29,7 +29,7 @@ index 0ec1ceb..b8b0027 100644 get_app_key(&hkey, &appkey); -@@ -961,6 +962,34 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_ +@@ -1045,6 +1046,34 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_ TRACE("setting default deadzone to: \"%s\" %d\n", buffer, This->deadzone); } @@ -65,10 +65,10 @@ index 0ec1ceb..b8b0027 100644 if (!This->axis_map) return DIERR_OUTOFMEMORY; diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c -index 963e62f..6286746 100644 +index ec4cb94c034..7dc9deff8c4 100644 --- a/dlls/dinput/joystick_linux.c +++ b/dlls/dinput/joystick_linux.c -@@ -807,10 +807,13 @@ static void joy_polldev(LPDIRECTINPUTDEVICE8A iface) +@@ -856,10 +856,13 @@ static void joy_polldev( IDirectInputDevice8W *iface ) jse.type,jse.number,jse.value); if (jse.type & JS_EVENT_BUTTON) { @@ -85,10 +85,10 @@ index 963e62f..6286746 100644 else if (jse.type & JS_EVENT_AXIS) { diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c -index 910e755..8ea268e 100644 +index ef7b160ba58..7830cce3ced 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c -@@ -836,6 +836,8 @@ static void joy_polldev(LPDIRECTINPUTDEVICE8A iface) +@@ -908,6 +908,8 @@ static void joy_polldev( IDirectInputDevice8W *iface ) if (btn & 0x80) { btn &= 0x7F; @@ -98,10 +98,10 @@ index 910e755..8ea268e 100644 This->generic.js.rgbButtons[btn] = value = ie.value ? 0x80 : 0x00; } diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c -index 0701b9f..224e203 100644 +index 174a78b7fd4..60e3967d921 100644 --- a/dlls/dinput/joystick_osx.c +++ b/dlls/dinput/joystick_osx.c -@@ -809,6 +809,8 @@ static void poll_osx_device_state(LPDIRECTINPUTDEVICE8A iface) +@@ -844,6 +844,8 @@ static void poll_osx_device_state( IDirectInputDevice8W *iface ) TRACE("valueRef %s val %d oldVal %d newVal %d\n", debugstr_cf(valueRef), val, oldVal, newVal); if (oldVal != newVal) { @@ -111,7 +111,7 @@ index 0701b9f..224e203 100644 queue_event(iface,inst_id,newVal,GetCurrentTime(),device->generic.base.dinput->evsequence++); } diff --git a/dlls/dinput/joystick_private.h b/dlls/dinput/joystick_private.h -index e758cac..4a382c2 100644 +index 0f191787158..606475759ef 100644 --- a/dlls/dinput/joystick_private.h +++ b/dlls/dinput/joystick_private.h @@ -33,6 +33,9 @@ @@ -121,7 +121,7 @@ index e758cac..4a382c2 100644 +/* Number of buttons for which to allow remapping */ +#define MAX_MAP_BUTTONS 128 + - typedef void joy_polldev_handler(LPDIRECTINPUTDEVICE8A iface); + typedef void joy_polldev_handler( IDirectInputDevice8W *iface ); typedef struct JoystickGenericImpl @@ -47,6 +50,7 @@ typedef struct JoystickGenericImpl @@ -133,5 +133,5 @@ index e758cac..4a382c2 100644 joy_polldev_handler *joy_polldev; -- -1.9.1 +2.30.2 diff --git a/patches/eventfd_synchronization/0042-kernel32-tests-Zigzag-test.patch b/patches/eventfd_synchronization/0042-kernel32-tests-Zigzag-test.patch index 5f49eb2a..049f723d 100644 --- a/patches/eventfd_synchronization/0042-kernel32-tests-Zigzag-test.patch +++ b/patches/eventfd_synchronization/0042-kernel32-tests-Zigzag-test.patch @@ -1,4 +1,4 @@ -From c076b2fef32e83de8e1ee2bee7a4a4ad997fcfff Mon Sep 17 00:00:00 2001 +From b0d987483476c7c6517a81e602f3bb8c20033f08 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Tue, 26 Jun 2018 18:44:44 -0500 Subject: [PATCH] kernel32/tests: Zigzag test. @@ -9,11 +9,11 @@ The primary function is to check for races. The secondary function is to measure 1 file changed, 79 insertions(+) diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c -index 7df1b1406b4..666318cb2c3 100644 +index 997c34ed0fd..79dbcc19660 100644 --- a/dlls/kernel32/tests/sync.c +++ b/dlls/kernel32/tests/sync.c -@@ -3135,6 +3135,84 @@ static void test_QueueUserAPC(void) - ok( ret == WAIT_OBJECT_0, "SleepEx returned %u\n", ret); +@@ -3154,6 +3154,84 @@ static void test_QueueUserAPC(void) + ok(apc_count == 1, "APC count %u\n", apc_count); } +static int zigzag_state, zigzag_count[2], zigzag_stop; @@ -97,7 +97,7 @@ index 7df1b1406b4..666318cb2c3 100644 START_TEST(sync) { char **argv; -@@ -3200,5 +3278,6 @@ START_TEST(sync) +@@ -3220,5 +3298,6 @@ START_TEST(sync) test_srwlock_example(); test_alertable_wait(); test_apc_deadlock(); diff --git a/patches/msvcrt-Math_Precision/0001-msvcrt-Calculate-sinh-cosh-exp-pow-with-higher-preci.patch b/patches/msvcrt-Math_Precision/0001-msvcrt-Calculate-sinh-cosh-exp-pow-with-higher-preci.patch index dd98a867..f9429a0f 100644 --- a/patches/msvcrt-Math_Precision/0001-msvcrt-Calculate-sinh-cosh-exp-pow-with-higher-preci.patch +++ b/patches/msvcrt-Math_Precision/0001-msvcrt-Calculate-sinh-cosh-exp-pow-with-higher-preci.patch @@ -1,4 +1,4 @@ -From 25f4c3fd7e333d9da438145ee0f0ed56ef74f4a6 Mon Sep 17 00:00:00 2001 +From 99640ba7474a35f086d85bdb0b416e1e00d31c2f Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Fri, 10 Apr 2015 07:51:16 +0200 Subject: [PATCH] msvcrt: Calculate sinh/cosh/exp/pow with higher precision. @@ -10,10 +10,10 @@ Based on a patch by Zheng Chen. 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/dlls/msvcrt/unixlib.c b/dlls/msvcrt/unixlib.c -index 3913d61048a..a5a41df08a3 100644 +index 6d3a3bd5a79..e0581f713cd 100644 --- a/dlls/msvcrt/unixlib.c +++ b/dlls/msvcrt/unixlib.c -@@ -42,6 +42,61 @@ +@@ -42,12 +42,67 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); @@ -73,9 +73,7 @@ index 3913d61048a..a5a41df08a3 100644 +#endif + /********************************************************************* - * acosh - */ -@@ -182,7 +237,7 @@ static float CDECL unix_cosf( float x ) + * cosh */ static double CDECL unix_cosh( double x ) { @@ -84,7 +82,7 @@ index 3913d61048a..a5a41df08a3 100644 } /********************************************************************* -@@ -254,7 +309,7 @@ static float CDECL unix_erfcf(float x) +@@ -63,7 +118,7 @@ static float CDECL unix_coshf( float x ) */ static double CDECL unix_exp( double x ) { @@ -93,7 +91,7 @@ index 3913d61048a..a5a41df08a3 100644 } /********************************************************************* -@@ -689,7 +744,7 @@ static float CDECL unix_nexttowardf(float num, double next) +@@ -297,7 +352,7 @@ static float CDECL unix_log2f(float x) */ static double CDECL unix_pow( double x, double y ) { @@ -102,7 +100,7 @@ index 3913d61048a..a5a41df08a3 100644 } /********************************************************************* -@@ -861,7 +916,7 @@ static float CDECL unix_sinf( float x ) +@@ -313,7 +368,7 @@ static float CDECL unix_powf( float x, float y ) */ static double CDECL unix_sinh( double x ) { @@ -112,5 +110,5 @@ index 3913d61048a..a5a41df08a3 100644 /********************************************************************* -- -2.29.2 +2.30.2 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 5b3a5aaa..47a40dc8 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -51,7 +51,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "94eb8d36461f6eb380b95e58629ad4871e5efef4" + echo "8ddff3f51faca2c0824e204a69f69e241fb93d15" } # Show version information diff --git a/patches/server-default_integrity/0005-ntdll-Always-start-the-initial-process-through-start.patch b/patches/server-default_integrity/0005-ntdll-Always-start-the-initial-process-through-start.patch index 68acbcaa..cab67347 100644 --- a/patches/server-default_integrity/0005-ntdll-Always-start-the-initial-process-through-start.patch +++ b/patches/server-default_integrity/0005-ntdll-Always-start-the-initial-process-through-start.patch @@ -1,39 +1,30 @@ -From cd7883aaf87e8c15a6171d013e6b6c1ca518d158 Mon Sep 17 00:00:00 2001 +From eac7d559f3a0dd0ab5b05a1ff461c619e6faa2d5 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Fri, 21 May 2021 21:52:06 -0500 Subject: [PATCH] ntdll: Always start the initial process through start.exe. Signed-off-by: Zebediah Figura --- - dlls/ntdll/unix/env.c | 23 ++++------------------- - 1 file changed, 4 insertions(+), 19 deletions(-) + dlls/ntdll/unix/env.c | 21 +++------------------ + 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c -index 5d8c14625f9..69f2dda1c2b 100644 +index 837725dd0d1..ed844e26593 100644 --- a/dlls/ntdll/unix/env.c +++ b/dlls/ntdll/unix/env.c -@@ -1921,6 +1921,7 @@ static inline DWORD append_string( void **ptr, const RTL_USER_PROCESS_PARAMETERS +@@ -2039,6 +2039,7 @@ static void init_peb( RTL_USER_PROCESS_PARAMETERS *params, void *module ) */ - static RTL_USER_PROCESS_PARAMETERS *build_initial_params(void) + static RTL_USER_PROCESS_PARAMETERS *build_initial_params( void **module ) { + static const char *args[] = { "start.exe", "/exec" }; static const WCHAR valueW[] = {'1',0}; static const WCHAR pathW[] = {'P','A','T','H'}; RTL_USER_PROCESS_PARAMETERS *params = NULL; -@@ -1928,7 +1929,7 @@ static RTL_USER_PROCESS_PARAMETERS *build_initial_params(void) - WCHAR *dst, *image, *cmdline, *path, *bootstrap; - WCHAR *env = get_initial_environment( &env_pos, &env_size ); - WCHAR *curdir = get_initial_directory(); -- void *module = NULL; -+ void *module; - NTSTATUS status; - - /* store the initial PATH value */ -@@ -1950,24 +1951,8 @@ static RTL_USER_PROCESS_PARAMETERS *build_initial_params(void) +@@ -2067,24 +2068,8 @@ static RTL_USER_PROCESS_PARAMETERS *build_initial_params( void **module ) add_registry_environment( &env, &env_pos, &env_size ); env[env_pos++] = 0; -- status = load_main_exe( NULL, main_argv[1], curdir, &image, &module ); +- status = load_main_exe( NULL, main_argv[1], curdir, &image, module ); - if (!status) - { - if (main_image_info.ImageCharacteristics & IMAGE_FILE_DLL) status = STATUS_INVALID_IMAGE_FORMAT; @@ -46,16 +37,16 @@ index 5d8c14625f9..69f2dda1c2b 100644 - { - static const char *args[] = { "start.exe", "/exec" }; - free( image ); -- if (module) NtUnmapViewOfSection( GetCurrentProcess(), module ); -- load_start_exe( &image, &module ); +- if (*module) NtUnmapViewOfSection( GetCurrentProcess(), *module ); +- load_start_exe( &image, module ); - prepend_argv( args, 2 ); - } - else rebuild_argv(); -+ load_start_exe( &image, &module ); ++ load_start_exe( &image, module ); + prepend_argv( args, 2 ); - NtCurrentTeb()->Peb->ImageBaseAddress = module; main_wargv = build_wargv( get_dos_path( image )); + cmdline = build_command_line( main_wargv ); -- 2.30.2 diff --git a/staging/upstream-commit b/staging/upstream-commit index cae4e581..fc3dabf6 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -94eb8d36461f6eb380b95e58629ad4871e5efef4 +8ddff3f51faca2c0824e204a69f69e241fb93d15