-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Frame Advance: Fix UI update spam when continuously advancing. #12784
base: master
Are you sure you want to change the base?
Conversation
a4e431c
to
98d6d77
Compare
This means other features will not receive those events as well (they will get 2 events, instead of the number of frame skips that were triggered). I'd prefer to have the UI ignore those events when the flag is defined. |
I couldn't find anything that requires the massive spam of signals that are produced. AFAIK everything only needs to update when frame advancing is done and not on each frame. In regards to your work, this only affects holding the Frame Advance button and not custom Frame Advance logic. If there is something that requires those signals I have no problem sorting out the blocking, but I think tons of widgets are hit and none of them need the signals. |
98d6d77
to
fa95c4b
Compare
My work was the first thing I thought of. Not sure what you mean by 'custom frame advance logic'? It still uses the frame advance hotkey or ui button. I can wrap your change in a check but just in general it seems odd to me to block all the callbacks, when you're trying to solve this for the UI. I can work around it but wanted to mention it in case others share my concern. |
Sorry, I haven't seen all your code so I may have misunderstood. I thought you directly called DoFrameStep() and didn't need the Hotkey for anything special. Please correct me if I'm wrong, but I think as of now EmulationStateChanged signals and callbacks only affect UI/Debug stuff. If that's correct, I think handling your usage as a special outlier is simpler. |
…en. Blocks signals from being spammed to update the UI.
fa95c4b
to
627875a
Compare
Holding down frame advance was overloading Qt with update calls, causing issues
Not sure if this is the best method. If there are other times blocking updates would be useful, the names could be made to be more general.
New behavior: Updates calls on first frame advance (for quick 1-frame advances). Blocks all other calls until finished, then reports a new OnStateChanged (paused usually) call.
It could also just do an UpdateDisasmDialog, but things are getting messy with that signal and widgets are more reliable with using OnStateChanged.