Mess with Jake's code until it works in Linux.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2961 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2010-05-07 09:55:30 +00:00
parent 07eed4ed47
commit aaded4ec6d
4 changed files with 16 additions and 9 deletions

View File

@ -149,7 +149,7 @@ protected:
public:
typedef T element_type;
wxEXPLICIT ScopedArray(T * ptr = NULL) :
wxEXPLICIT ScopedArray(T * ptr = NULL)
{
m_array = ptr;
m_valid_range = 0xffffffff;

View File

@ -16,6 +16,7 @@
#pragma once
#include "Threading.h"
using Threading::ScopedLock;
// --------------------------------------------------------------------------------------
// ScopedPtrMT
@ -44,7 +45,7 @@ public:
ScopedPtrMT& Reassign(T * ptr = NULL)
{
TPtr doh = (TPtr)AtomicExchangePointer( m_ptr, ptr );
TPtr doh = (TPtr)Threading::AtomicExchangePointer( m_ptr, ptr );
if ( ptr != doh ) delete doh;
return *this;
}

View File

@ -154,6 +154,7 @@ set(UtilitiesHeaders
../../include/Utilities/RedtapeWindows.h
../../include/Utilities/SafeArray.h
../../include/Utilities/ScopedPtr.h
../../include/Utilities/ScopedPtrMT.h
../../include/Utilities/StringHelpers.h
../../include/Utilities/Threading.h
../../include/Utilities/ThreadingDialogs.h

View File

@ -206,7 +206,8 @@ void AppPluginManager::Load( PluginsEnum_t pid, const wxString& srcfile )
{
if( !wxThread::IsMain() )
{
wxGetApp().ProcessAction( LoadSinglePluginEvent( pid, srcfile ) );
LoadSinglePluginEvent evt( pid, srcfile );
wxGetApp().ProcessAction( evt);
Sleep( 5 );
return;
}
@ -218,7 +219,8 @@ void AppPluginManager::Unload( PluginsEnum_t pid )
{
if( !wxThread::IsMain() )
{
wxGetApp().ProcessAction( SinglePluginMethodEvent( &AppPluginManager::Unload, pid ) );
SinglePluginMethodEvent evt( &AppPluginManager::Unload, pid );
wxGetApp().ProcessAction( evt );
Sleep( 5 );
return;
}
@ -245,7 +247,9 @@ void AppPluginManager::Init( PluginsEnum_t pid )
{
if( !wxThread::IsMain() )
{
wxGetApp().ProcessAction( SinglePluginMethodEvent( &AppPluginManager::Init, pid ) );
//pxInvokeActionEvent& evt = SinglePluginMethodEvent( &AppPluginManager::Init, pid );
SinglePluginMethodEvent evt(&AppPluginManager::Init, pid);
wxGetApp().ProcessAction( evt );
Sleep( 5 );
return;
}
@ -257,7 +261,8 @@ void AppPluginManager::Shutdown( PluginsEnum_t pid )
{
if( !wxThread::IsMain() )
{
wxGetApp().ProcessAction( SinglePluginMethodEvent( &AppPluginManager::Shutdown, pid ) );
SinglePluginMethodEvent evt( &AppPluginManager::Shutdown, pid );
wxGetApp().ProcessAction( evt );
Sleep( 5 );
return;
}