mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 13:57:57 -07:00
f106a9637d
Core::PauseAndLock requires all calls to it to be balanced, like this: const bool was_unpaused = Core::PauseAndLock(true); // do stuff on the CPU thread Core::PauseAndLock(false, was_unpaused); Aside from being a bit cumbersome, it turns out all callers really don't need to know about was_unpaused at all. They just need to do something on the CPU thread safely, including locking/unlocking. So this commit replaces Core::PauseAndLock with a function that makes both the purpose and the scope of what is being run on the CPU thread visually clear. This makes it harder to accidentally run something on the wrong thread, or forget the second call to PauseAndLock to unpause, or forget that it needs to be passed was_unpaused at the end. We also don't need comments to indicate code X is being run on the CPU thread anymore, as the function name makes it obvious. |
||
---|---|---|
.. | ||
Config | ||
GameList | ||
QtUtils | ||
Settings | ||
AboutDialog.cpp | ||
AboutDialog.h | ||
CMakeLists.txt | ||
DolphinQt2.manifest | ||
DolphinQt2.vcxproj | ||
DolphinQt2.vcxproj.user | ||
Host.cpp | ||
Host.h | ||
HotkeyScheduler.cpp | ||
HotkeyScheduler.h | ||
InDevelopmentWarning.cpp | ||
InDevelopmentWarning.h | ||
Info.plist.in | ||
Main.cpp | ||
MainWindow.cpp | ||
MainWindow.h | ||
MenuBar.cpp | ||
MenuBar.h | ||
qt.conf | ||
RenderWidget.cpp | ||
RenderWidget.h | ||
Resources.cpp | ||
Resources.h | ||
Settings.cpp | ||
Settings.h | ||
ToolBar.cpp | ||
ToolBar.h | ||
WiiUpdate.cpp | ||
WiiUpdate.h |