Skip to content
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

DolphinQt: Prevent MemoryViewWidget updates when hidden #11738

Merged

Conversation

malleoz
Copy link
Contributor

@malleoz malleoz commented Apr 7, 2023

This fixes a minor issue introduced by PR#11554.

In the constructor of MemoryViewWidget we connect the Settings::EmulationStateChanged signal to MemoryViewWidget::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.

@AdmiralCurtiss AdmiralCurtiss merged commit d5b811d into dolphin-emu:master Apr 8, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants