Ferrster / Snowrunner-Manual-Gearbox-Mod

MIT License
57 stars 1 forks source link

GameOverlayRenderer filling up when using SMGM #10

Closed Ronald-Tagson closed 1 year ago

Ronald-Tagson commented 1 year ago

Hey, so I recently started using SMGM and find it AWESOME! But I've also come to notice a small bug that carries over when using Snowrunner on Steam. I've seen that my C: Drive (where Steam is) is filling up and after checking with WinDirStat, I noticed that it was the GameOverlayRenderer.log which just kept growing as long as I had Snowrunner open with SMGM. I then tried to check what was going on and in the log it just kept repeating:

Mon Sep 11 21:40:55 2023 UTC - CXInputGameMemStream::GetRealXInputUserIndex(): Passed an invalid index: 255 Mon Sep 11 21:40:55 2023 UTC - CXInputGameMemStream::GetRealXInputUserIndex(): Passed an invalid index: 255

until A) my storage was full or B) I closed the game with SMGM and restarted it, which would just start the process anew... I've also attached the whole log until it starts repeating the text from before into a pastebin: https://pastebin.com/cYBWjykP

Would appreciate if it got fixed! ❤️ Love from Estonia

Ferrster commented 1 year ago

Hi! Thanks for the report!

Yes, you're right. Thanks to your log, I noticed that GameOverlayRenderer hooks some functions related to XInput (thing that handles gamepad input) and is notified when I call any of these functions in my code. And, apparently, it does not want to process XUSER_INDEX_ANY (which equals to 255) when passed into XInputGetKeystroke(). And, as I call this function VERY often, it spams with this message.

Currently I'm working on different input method (using DirectInput for all possible input instead of XInput) and it does not have this problem. And it supports all kinds of joysticks, including shifters, wheels and pedals.

I'll release a fix, possibly today for this issue, as it seems to be kinda critical.

Ferrster commented 1 year ago

Fixed in v0.1.3. Again, thank you! This was really important report