mirror of https://github.com/PCSX2/pcsx2.git
PluginManager: port to std::atomic
This commit is contained in:
parent
97cc468509
commit
34826c9506
|
@ -1213,7 +1213,7 @@ void SysCorePlugins::Open()
|
|||
|
||||
if (GSopen2) GetMTGS().WaitForOpen();
|
||||
|
||||
if( !AtomicExchange( m_mcdOpen, true ) )
|
||||
if( !m_mcdOpen.exchange(true) )
|
||||
{
|
||||
DbgCon.Indent().WriteLn( "Opening Memorycards");
|
||||
OpenPlugin_Mcd();
|
||||
|
@ -1313,7 +1313,7 @@ void SysCorePlugins::Close()
|
|||
|
||||
Console.WriteLn( Color_StrongBlue, "Closing plugins..." );
|
||||
|
||||
if( AtomicExchange( m_mcdOpen, false ) )
|
||||
if( m_mcdOpen.exchange(false) )
|
||||
{
|
||||
DbgCon.Indent().WriteLn( "Closing Memorycards");
|
||||
ClosePlugin_Mcd();
|
||||
|
|
|
@ -295,7 +295,7 @@ protected:
|
|||
Threading::MutexRecursive m_mtx_PluginStatus;
|
||||
|
||||
// Lovely hack until the new PS2E API is completed.
|
||||
volatile u32 m_mcdOpen;
|
||||
std::atomic<bool> m_mcdOpen;
|
||||
|
||||
public: // hack until we unsuck plugins...
|
||||
std::unique_ptr<PluginStatus_t> m_info[PluginId_AllocCount];
|
||||
|
|
Loading…
Reference in New Issue