dolphin/Source/Core
Léo Lam f106a9637d Replace balanced Core::PauseAndLock calls with RunAsCPUThread
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.
2017-07-21 16:45:59 +08:00
..
AudioCommon Swapped C-style arrays to std::array 2017-06-27 07:12:15 -03:00
Common Merge pull request #5720 from JosJuice/file-metadata 2017-07-11 00:28:34 +02:00
Core Replace balanced Core::PauseAndLock calls with RunAsCPUThread 2017-07-21 16:45:59 +08:00
DiscIO Merge pull request #5795 from JosJuice/gc-region-detection 2017-07-20 14:13:11 +08:00
DolphinNoGUI Replace balanced Core::PauseAndLock calls with RunAsCPUThread 2017-07-21 16:45:59 +08:00
DolphinQt2 Replace balanced Core::PauseAndLock calls with RunAsCPUThread 2017-07-21 16:45:59 +08:00
DolphinWX Replace balanced Core::PauseAndLock calls with RunAsCPUThread 2017-07-21 16:45:59 +08:00
InputCommon DolphinWX: fix input bitmaps not working when background input is off 2017-07-12 00:12:07 -07:00
UICommon Make Visual Studio happy 2017-06-28 20:42:01 +02:00
VideoBackends D3DBase: Use the swapchain discard mode when possible. 2017-07-10 14:25:28 +02:00
VideoCommon Merge pull request #5726 from mimimi085181/minimal-tmem-cache-emulation 2017-07-11 22:49:19 -07:00
CMakeLists.txt Moved NoGUI out of DolphinWx. 2017-03-08 01:24:18 -08:00