DolphinQt: Prevent MemoryViewWidget updates when hidden #11738
Merged
+3
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
This fixes a minor issue introduced by PR#11554.
In the constructor of
MemoryViewWidgetwe connect theSettings::EmulationStateChangedsignal toMemoryViewWidget::UpdateColumns(). This poses a problem with TASing because a frame advance step implicitly changes the emulation state. When we hold down the frame advance key, this signal is then fired multiple times in quick succession.On every instance that this signal is fired, it turns out that
UpdateColumns()would wait to acquire the CPU lock and begin re-writing data in the memory view table, even if the debugging UI was not enabled. This extra time spent acquiring the CPU lock would cause TAS Input windows to become unresponsive and laggy.Simply checking for widget visibility before continuing seems to solve this perfectly. In the case where the widget is enabled, the
UpdateColumns()function progresses as normal. I obviously still encounter the TAS Input latency with this widget enabled, but that's inevitable and not really a concern.