itsmeft24 / hi-octane-hook

A collection of code mods for the PC version of Cars: Mater-National, intended to be used alongside the Hi-Octane mod for extending the functionality of the game.
MIT License
8 stars 0 forks source link

Controller settings crashes the game while Widescreen is enabled. #8

Open itsmeft24 opened 1 year ago

itsmeft24 commented 1 year ago

When entering the controller settings menu while widescreen is enabled, the game will crash.

Jordon87 commented 1 year ago

It may have something to do with one of the text ingame functions.

While debugging on Cheat Engine, I've gotten these crash dump results that leads to the game's code:

EDX: 00718D42 EIP: 0058E292

I have no idea why it's crashing, I'll have to look more into it.

itsmeft24 commented 1 year ago

Looks like it's crashing in double __thiscall ScreenTextFont::GetWidth(unsigned short*)... Just a wild shot in the dark, perhaps it's related to Xbox buttons potentially being treated as special characters?

Jordon87 commented 1 year ago

That could be the case.

I dunno if the 360 version has a controller settings menu but if it doesn't then, I guess it explains why the game is crashing on this.

Jordon87 commented 1 year ago

Forgot to mention this, but m_tempUTF16Buffer leads to the EDX, and since it leads to a buffer size, is it hitting a limit or something? (could be wrong here)

itsmeft24 commented 10 months ago

The style files in C\UI seem to be the culprit; adding widescreen entries for MenuItemSelectedFont in them fixes this. I'll update the precompiled asset pack to include these fixes.