Module: wine
Branch: master
Commit: 4f8939e1d9e8e85cd669d76ba748ff488fc4b522
URL: https://gitlab.winehq.org/wine/wine/-/commit/4f8939e1d9e8e85cd669d76ba748ff…
Author: Nicholas Tay <nick(a)windblume.net>
Date: Wed Jan 17 20:30:33 2024 +1100
win32u: Preserve rawinput device instance ID case in add_device().
In ntoskrnl.exe, when a PnP device interface is registered, the
interface path casing is retained, with only the hardware ID being upper
case. Thus, this patch looks to align the behaviour between PnP and
rawinput, particularly for games that seem to rely on these two strings
being consistent for hotplug.
This updated behaviour also seems consistent with Windows.
---
dlls/win32u/rawinput.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/win32u/rawinput.c b/dlls/win32u/rawinput.c
index bd2e00a31c4..e6c442c6ba6 100644
--- a/dlls/win32u/rawinput.c
+++ b/dlls/win32u/rawinput.c
@@ -229,6 +229,7 @@ static struct device *add_device( HKEY key, DWORD type )
SIZE_T size;
HANDLE file;
WCHAR *path;
+ unsigned int i = 0;
if (!query_reg_value( key, symbolic_linkW, value, sizeof(value_buffer) - sizeof(WCHAR) ))
{
@@ -237,8 +238,12 @@ static struct device *add_device( HKEY key, DWORD type )
}
memset( value->Data + value->DataLength, 0, sizeof(WCHAR) );
- /* upper case everything but the GUID */
- for (path = (WCHAR *)value->Data; *path && *path != '{'; path++) *path = towupper( *path );
+ /* upper case everything until the instance ID */
+ for (path = (WCHAR *)value->Data; *path && i < 2; path++)
+ {
+ if (*path == '#') ++i;
+ *path = towupper( *path );
+ }
path = (WCHAR *)value->Data;
/* path is in DOS format and begins with \\?\ prefix */
Module: wine
Branch: master
Commit: fca71b6ef84e2f52afe369e1a1d1f5908f138881
URL: https://gitlab.winehq.org/wine/wine/-/commit/fca71b6ef84e2f52afe369e1a1d1f5…
Author: Alex Henrie <alexhenrie24(a)gmail.com>
Date: Sat Jan 6 12:53:30 2024 -0700
msvcp140_2: Implement __std_smf_hypot3.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56078
---
dlls/msvcp140_2/Makefile.in | 3 +++
dlls/msvcp140_2/math.c | 26 ++++++++++++++++++++++++++
dlls/msvcp140_2/msvcp140_2.spec | 4 ++--
3 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcp140_2/Makefile.in b/dlls/msvcp140_2/Makefile.in
index 5b4865db844..0f75819198f 100644
--- a/dlls/msvcp140_2/Makefile.in
+++ b/dlls/msvcp140_2/Makefile.in
@@ -1 +1,4 @@
MODULE = msvcp140_2.dll
+
+SOURCES = \
+ math.c
diff --git a/dlls/msvcp140_2/math.c b/dlls/msvcp140_2/math.c
new file mode 100644
index 00000000000..d2909745a9d
--- /dev/null
+++ b/dlls/msvcp140_2/math.c
@@ -0,0 +1,26 @@
+/*
+ * Special math functions
+ *
+ * Copyright 2024 Alex Henrie
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <math.h>
+
+double __stdcall __std_smf_hypot3(double x, double y, double z)
+{
+ return hypot(hypot(x, y), z);
+}
diff --git a/dlls/msvcp140_2/msvcp140_2.spec b/dlls/msvcp140_2/msvcp140_2.spec
index 0c10d213c4b..fbc63fa5e28 100644
--- a/dlls/msvcp140_2/msvcp140_2.spec
+++ b/dlls/msvcp140_2/msvcp140_2.spec
@@ -58,8 +58,8 @@
@ stub -arch=!i386 __std_smf_hermite
@ stub -arch=i386 ___std_smf_hermitef@8
@ stub -arch=!i386 __std_smf_hermitef
-@ stub -arch=i386 ___std_smf_hypot3@24
-@ stub -arch=!i386 __std_smf_hypot3
+@ stdcall -arch=i386 ___std_smf_hypot3@24(double double double) __std_smf_hypot3
+@ stdcall -arch=!i386 __std_smf_hypot3(double double double)
@ stub -arch=i386 ___std_smf_hypot3f@12
@ stub -arch=!i386 __std_smf_hypot3f
@ stub -arch=i386 ___std_smf_laguerre@12