nipkownix / re4_tweaks

Fixes and tweaks for the "UHD" port of Resident Evil 4
zlib License
346 stars 32 forks source link

ConsoleWnd: write game log msgs into log file, always log error msgs #459

Closed emoose closed 1 year ago

emoose commented 1 year ago

Figured it'd be useful to always log any of the bad OSPanic etc messages (except for OSReport) into log file, might come in handy for crash reports (eg. @linkthehylian's crashing issues at #431 which are maybe mem related, can maybe help track down what fails)

Seems we didn't actually write these logs into our log file though, just console window, added some code to add to log too but haven't been able to test it yet (not really sure how to make game cause an error to try it...)

(E: tried out patching part of game to always call OSPanic (nop 94855D) and seemed to log it fine, game did eventually crash after it spammed OSPanic a ton of times though, something in ImFont::CalcTextSizeA+0x117 in DINPUT8.dll)

Looks like it should be fine to me though, but let me know if you spot some issue with it.

nipkownix commented 1 year ago

Looks good to me. Thank you again! And sorry for taking a so long to get to this. This first month at the new job was a bit overwhelming 😅