-
Notifications
You must be signed in to change notification settings - Fork 629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InputSettings: Fix controller type counter to restore WPAD limit #1118
Conversation
bcc7236
to
bc11adf
Compare
whats the chance of this fixing pro pads in black ops 2? |
I didn't look at the code yet but is this change necessary? As far as I remember this was a deliberate optimization by Petergov to make the loading of the input window faster. Giving your PR a quick test I can indeed see that opening the window now takes about half a second on my Windows system, whereas it used to be near instant. |
The function that counts the types of currently configured controllers, Fixing this problem without initialising every page when opening the input settings would require a bit more complicated restructuring. |
…urrent page can count controllers" This reverts commit bc11adf.
…ager function directly
It turns out that InputManager has the same function that the input settings window has, but instead of looking at the pages it looks at the actual state of InputManager. That InputManager function was unused. I think someone prepared this function to replace the InputSettings function but forgot to actually patch it in. I've now done that. Hopefully that's faster than initialising all pages. (which was instant on linux so I didn't notice) |
Sorry for spamming draft to ready for review. But I thought I saw a mistake. |
get_emulated_controller_types always returned zero for the number of wpads. It was able to count VPAD's because EmulatedController::VPAD is the only enum value that evaluates to false.
Additionally, create all pages of the input settings menu when it is first opened, so that the counter can see controllers on different pages before the user viewed those pages.
This restores the WPAD limit of 7.