Compare commits

..

2 commits

Author SHA1 Message Date
Echo J.
52a2798b40
Merge fdce60d22f into c733f3e7d1 2024-11-17 01:29:39 +03:00
Echo J
c733f3e7d1 III: Fix the missing window icon
For some reason GTA 3 sets the hIcon value in WNDCLASSA struct to
NULL which causes the window icon to be the default one (this was
fixed in Vice City)
2024-11-16 22:20:03 +01:00
2 changed files with 12 additions and 1 deletions

View file

@ -71,6 +71,7 @@ All the remaining, non-critical fixes.
* Detached limbs now have properly working LODs, instead of rendering the normal and low-detail models at the same time.
* Low Brightness options now load and save correctly, instead of reverting to overly bright values.
* Support for the `brakelights` dummy has been restored, allowing brake and reverse lights to work as they did in the PS2 version, rather than always sharing the same placement with the tail lights.
* The correct window icon is now displayed.
* ⚙️ Fixed siren corona placements in Firetruck, Ambulance, and Enforcer.
* ⚙️ Fixed taxi light corona placement for Taxi.
* ⚙️ Fixed police chopper's searchlight placement.

View file

@ -229,6 +229,16 @@ namespace Common {
}
TXN_CATCH();
// III: Patch the icon handle to fix missing window icon
// (This is fixed since VC)
try
{
auto addr = get_pattern("c7 44 24 1c 00 00 00 00 c7 44 24 08 00 20 00", 0x4);
HICON wndIconIII = LoadIconA(GetModuleHandleA(nullptr), MAKEINTRESOURCEA(0x412)); // Group icon ID
Patch<HICON>(addr, wndIconIII);
}
TXN_CATCH();
// No censorships
try
@ -249,4 +259,4 @@ namespace Common {
TXN_CATCH();
}
}
}
}