dinput-regression-fix: Remove patch.

This is not the correct fix for the regression, and the regression is not in fact a regression.
This commit is contained in:
Elizabeth Figura 2024-08-12 16:50:26 -05:00
parent 92374493ee
commit 761b7f72d0
2 changed files with 0 additions and 34 deletions

View File

@ -1,29 +0,0 @@
From 434df65f9023ec64c175825e5b38cd9daf744565 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aida=20Jonikien=C4=97?= <aidas957@gmail.com>
Date: Sat, 10 Aug 2024 22:20:30 +0300
Subject: [PATCH] dinput: Use the correct array index in
keyboard_create_device().
This fixes a segfault when launching NFS Underground.
Fixes: f434ea12b83 ("dinput: Implement DIPROP_SCANCODE.")
---
dlls/dinput/keyboard.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c
index a83f825e97d..aee1d996dde 100644
--- a/dlls/dinput/keyboard.c
+++ b/dlls/dinput/keyboard.c
@@ -211,7 +211,7 @@ HRESULT keyboard_create_device( struct dinput *dinput, const GUID *guid, IDirect
if (FAILED(hr = dinput_device_init_device_format( &impl->base.IDirectInputDevice8W_iface ))) goto failed;
- for (i = 0, index = 0; i < 512; ++i)
+ for (i = 0, index = 0; i < impl->base.device_format.dwNumObjs; ++i)
{
if (!GetKeyNameTextW( i << 16, instance.tszName, ARRAY_SIZE(instance.tszName) )) continue;
if (!(dik = map_dik_code( i, 0, subtype, impl->base.dinput->dwVersion ))) continue;
--
2.43.0

View File

@ -1,5 +0,0 @@
Fixes: Fix crash in NFS Underground
#Depends: dinput-joy-mappings
Depends: dinput-scancode
# PR 6249