https://bugs.winehq.org/show_bug.cgi?id=47794
Bug ID: 47794 Summary: Rockstar Games Launcher installer button images do not display Product: Wine Version: 4.16 Hardware: x86 URL: https://gamedownloads.rockstargames.com/public/install er/Rockstar-Games-Launcher.exe OS: Linux Status: UNCONFIRMED Severity: trivial Priority: P2 Component: user32 Assignee: wine-bugs@winehq.org Reporter: bshanks@codeweavers.com Distribution: ---
Created attachment 65281 --> https://bugs.winehq.org/attachment.cgi?id=65281 Screenshot of Rockstar Games Launcher installer as it works now
When the Rockstar Games Launcher installer isn't crashing because of a buffer overrun (see bug 47783), the buttons are all missing their custom bitmaps and look very weird.
The code does the following:
CreateWindow("BUTTON", "Cancel", ...); hImage = LoadImage(NULL, "Icon_ButtonCancel.bmp", IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION | LR_LOADFROMFILE); SendMessage(hwndButton, BM_SETIMAGE, IMAGE_BITMAP, hImage); DeleteObject(hImage);
This seems to be fine on Windows, I assume the BM_SETIMAGE handler takes a ref on the bitmap and prevents it from being deleted. But Wine does delete the bitmap object, and then can't draw it ("warn:gdi: invalid handle" messages are printed).
Attached Wine screenshots of the installer currently and with DeleteObject() stubbed out