dolphin/Source/Core/DolphinWX
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
..
Cheats StringUtil: Make SplitString return by value 2017-06-11 16:48:20 +02:00
Config Replace balanced Core::PauseAndLock calls with RunAsCPUThread 2017-07-21 16:45:59 +08:00
Debugger Don't enable Boot to Pause by default in the debugger 2017-06-23 16:05:27 +02:00
ISOProperties Unify GetGameIniFilenames 2017-07-11 13:10:11 +02:00
Input Replace balanced Core::PauseAndLock calls with RunAsCPUThread 2017-07-21 16:45:59 +08:00
NetPlay DolphinWX: rename CGameListCtrl -> GameListCtrl 2017-06-23 17:25:52 -07:00
resources DolphinWX: Stop using XPM images 2016-01-05 19:11:58 +01:00
AboutDolphin.cpp WX: HiDPI: AboutDolphin 2016-10-04 13:47:21 +11:00
AboutDolphin.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
AuiToolBar.h Drop Dolphin-specific patch to wxWindows 2016-09-07 15:15:09 +02:00
CMakeLists.txt DolphinWX: fix input bitmaps not working when background input is off 2017-07-12 00:12:07 -07:00
ControllerConfigDiag.cpp Qt: Add controller (overview) window 2017-05-09 18:49:10 +02:00
ControllerConfigDiag.h Qt: Add controller (overview) window 2017-05-09 18:49:10 +02:00
DolphinSlider.cpp WX: HiDPI Support Framework 2016-10-04 13:47:21 +11:00
DolphinSlider.h WX: HiDPI Support Framework 2016-10-04 13:47:21 +11:00
DolphinWX.manifest Use .manifest file for apps on Windows 2017-02-10 14:18:45 -08:00
DolphinWX.rc Define the icon for "dolphin". The IDI_ICON1 seems to be preempted by the wx resource. This one does not. 2012-12-17 08:33:42 -06:00
DolphinWX.vcxproj DolphinWX: fix input bitmaps not working when background input is off 2017-07-12 00:12:07 -07:00
DolphinWX.vcxproj.filters DolphinWX: fix input bitmaps not working when background input is off 2017-07-12 00:12:07 -07:00
DolphinWX.vcxproj.user msbuild: increment other version numbers to vs2017 equivalents 2017-06-03 18:20:39 -07:00
FifoPlayerDlg.cpp Common: Move byte swapping utilities into their own header 2017-03-03 17:18:18 -05:00
FifoPlayerDlg.h WX: HiDPI: FifoPlayerDlg 2016-10-04 13:47:22 +11:00
Frame.cpp Replace balanced Core::PauseAndLock calls with RunAsCPUThread 2017-07-21 16:45:59 +08:00
Frame.h WX: Add menu item to perform online update 2017-06-28 11:22:10 +02:00
FrameAui.cpp DolphinWX: show simple message about scanning in statusbar. 2017-06-23 17:25:53 -07:00
FrameTools.cpp Replace balanced Core::PauseAndLock calls with RunAsCPUThread 2017-07-21 16:45:59 +08:00
GameListCtrl.cpp GameListCtrl: Put CACHE_REVISION in .cpp file 2017-06-27 11:27:36 +02:00
GameListCtrl.h GameListCtrl: Put CACHE_REVISION in .cpp file 2017-06-27 11:27:36 +02:00
Globals.h WX: Add menu item to perform online update 2017-06-28 11:22:10 +02:00
ISOFile.cpp DiscIO: Add convenience methods IsDisc and IsWii for Platform enum 2017-06-28 21:46:43 +02:00
ISOFile.h GameListItem: Rename m_banner to m_volume_banner 2017-06-27 21:31:37 +02:00
Info.plist.in CMake: use CMAKE_OSX_DEPLOYMENT_TARGET 2017-01-24 01:27:41 -08:00
LogConfigWindow.cpp LogConfigWindow: fix verbosity 2017-07-09 18:50:55 -07:00
LogConfigWindow.h DolphinWX: remove INI logic from LogConfigWindow 2017-07-07 16:44:38 -07:00
LogWindow.cpp LogWindow: don't unconfigure logger on destruction 2017-07-09 18:50:55 -07:00
LogWindow.h LogWindow: don't unconfigure logger on destruction 2017-07-09 18:50:55 -07:00
Main.cpp DolphinWX: fix input bitmaps not working when background input is off 2017-07-12 00:12:07 -07:00
Main.h DolphinWX: provide empty OnCmdLineParsed 2017-02-26 17:38:18 -08:00
MainMenuBar.cpp DolphinWX: Fix inconsistent region name for online system update 2017-07-01 16:40:07 +02:00
MainMenuBar.h WX: Add menu item to perform online update 2017-06-28 11:22:10 +02:00
MainToolBar.cpp Core: Convert State enum into an enum class 2017-02-05 08:32:23 -05:00
MainToolBar.h DolphinWX: Move common wxUpdateUIEvent functions to WxEventUtils 2016-11-06 09:02:59 -05:00
MemcardManager.cpp GCMemcard: Move memcard source files to their own directory 2017-03-14 21:55:25 -04:00
MemcardManager.h MemcardManager: Get rid of prefixed double-underscores from an identifier 2017-02-03 11:30:39 -05:00
PatchAddEdit.cpp WX: HiDPI: ISOProperties 2016-10-04 13:47:21 +11:00
PatchAddEdit.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
PostProcessingConfigDiag.cpp WX: HiDPI: VideoConfigDiag 2016-10-04 13:47:22 +11:00
PostProcessingConfigDiag.h WX: HiDPI: VideoConfigDiag 2016-10-04 13:47:22 +11:00
SoftwareVideoConfigDialog.cpp GameConfigLoader: Add GFX Game INI translations 2017-06-03 18:13:02 +01:00
SoftwareVideoConfigDialog.h VideoCommon: Drop GetConfigName. 2016-06-26 12:34:59 +02:00
TASInputDlg.cpp Don't translate button names 2017-05-06 16:29:10 +02:00
TASInputDlg.h TASInputDlg: Use an enum for ID constants 2017-04-03 04:29:15 -04:00
UINeedsControllerState.cpp DolphinWX: fix input bitmaps not working when background input is off 2017-07-12 00:12:07 -07:00
UINeedsControllerState.h DolphinWX: fix input bitmaps not working when background input is off 2017-07-12 00:12:07 -07:00
VideoConfigDiag.cpp VideoConfigDiag: Rename Quad-Buffer to HDMI 3D. 2017-07-05 22:43:39 +02:00
VideoConfigDiag.h GameConfigLoader: Add GFX Game INI translations 2017-06-03 18:13:02 +01:00
WxEventUtils.cpp Core: Convert State enum into an enum class 2017-02-05 08:32:23 -05:00
WxEventUtils.h DolphinWX: Move common wxUpdateUIEvent functions to WxEventUtils 2016-11-06 09:02:59 -05:00
WxUtils.cpp WX: Replace SetIcon with SetIcons(wxIconBundle) 2016-10-04 13:47:22 +11:00
WxUtils.h WX: Replace SetIcon with SetIcons(wxIconBundle) 2016-10-04 13:47:22 +11:00
resource.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00