Open emawind84 opened 3 months ago
The problem started from the following commit 5c3403dc4cf92341477d7e08ed8e5564a4b02a73
The RefreshInputBinds was present before your commit, I don't know if this was intended or just an oversight https://github.com/schellingb/dosbox-pure/commit/5c3403dc4cf92341477d7e08ed8e5564a4b02a73#diff-b64e80926bade6d32106d17933a67d887bebc353b32909dcd7dd308266a3419fL3357
The call to RefreshInputBinds(true);
exists inside DBP_PadMapping::SetPortMode
, so this change seems redundant? Maybe it isn't called in all cases where necessary?
Even if exists inside that method is not getting executed, I see the condition is different so my guess is the condition in not exactly correct. Sure is changing the condition is the right way, so I will do some test but feel free to do the fix yourself and close the PR.
if (mode != MODE_DISABLED) RefreshInputBinds(true);
My guess is the RefreshInputBinds should be executed whether the mode is disabled or not
Finally got time to look into this. Turns out the actual bug was in DBP_PadMapping::ClearBinds
which was unintentionally removing the mouse button bindings when asked to clear binds of port 0. I fixed this now in 95d9648 and cleaned up the code a bit.
Thanks appreciated
fix: mouse buttons don't work after launching a Windows 98 OS in some scenarios. Going into core options and changing dbp_mouse_input or other relevant options fix the problem
Fixes #489