You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Added patch with workaround for Windows 3.1 apps which call LoadImage(LR_LOADFROMFILE) with a resource id.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
From 0eda0c4092b0673e4b4e646388c53e2a8ecc2379 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Wed, 18 May 2016 18:08:24 +0800
|
||||
Subject: user32: Add a workaround for Windows 3.1 apps which call
|
||||
LoadImage(LR_LOADFROMFILE) with a resource id. (v2)
|
||||
|
||||
Fixes #24963.
|
||||
---
|
||||
dlls/user32/cursoricon.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c
|
||||
index 4f93195..95cc410 100644
|
||||
--- a/dlls/user32/cursoricon.c
|
||||
+++ b/dlls/user32/cursoricon.c
|
||||
@@ -1404,7 +1404,12 @@ static HICON CURSORICON_Load(HINSTANCE hInstance, LPCWSTR name,
|
||||
hInstance, debugstr_w(name), width, height, depth, fCursor, loadflags);
|
||||
|
||||
if ( loadflags & LR_LOADFROMFILE ) /* Load from file */
|
||||
- return CURSORICON_LoadFromFile( name, width, height, depth, fCursor, loadflags );
|
||||
+ {
|
||||
+ if (IS_INTRESOURCE(name) && GetProcessVersion(0) < 0x40000)
|
||||
+ WARN("Windows 3.1 app set LR_LOADFROMFILE without a name, fallback to loading from resource\n");
|
||||
+ else
|
||||
+ return CURSORICON_LoadFromFile( name, width, height, depth, fCursor, loadflags );
|
||||
+ }
|
||||
|
||||
if (!hInstance) hInstance = user32_module; /* Load OEM cursor/icon */
|
||||
|
||||
--
|
||||
2.8.0
|
||||
|
1
patches/user32-LR_LOADFROMFILE/definition
Normal file
1
patches/user32-LR_LOADFROMFILE/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [24963] Workaround for Windows 3.1 apps which call LoadImage(LR_LOADFROMFILE) with a resource id
|
Reference in New Issue
Block a user