mirror of https://github.com/PCSX2/pcsx2.git
Memcard Manager:
- Suspend emulation when opening the manager. Avoids all kinds of file access permission trouble. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4362 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
d1371e85f6
commit
c86fff7760
|
@ -129,6 +129,7 @@ namespace Dialogs
|
|||
|
||||
protected:
|
||||
Panels::BaseMcdListPanel* m_panel_mcdlist;
|
||||
bool m_needs_suspending;
|
||||
|
||||
public:
|
||||
virtual ~McdConfigDialog() throw() {}
|
||||
|
|
|
@ -95,6 +95,7 @@ Dialogs::McdConfigDialog::McdConfigDialog( wxWindow* parent )
|
|||
: BaseConfigurationDialog( parent, _("MemoryCard Manager"), 600 )
|
||||
{
|
||||
m_panel_mcdlist = new MemoryCardListPanel_Simple( this );
|
||||
m_needs_suspending = false;
|
||||
|
||||
// [TODO] : Plan here is to add an advanced tab which gives the user the ability
|
||||
// to configure the names of each memory card slot.
|
||||
|
@ -128,6 +129,18 @@ void Dialogs::McdConfigDialog::OnMultitapClicked( wxCommandEvent& evt )
|
|||
|
||||
bool Dialogs::McdConfigDialog::Show( bool show )
|
||||
{
|
||||
// Suspend the emulation before any file operations on the memory cards can be done.
|
||||
if( show && CoreThread.IsRunning() )
|
||||
{
|
||||
m_needs_suspending = true;
|
||||
CoreThread.Suspend();
|
||||
}
|
||||
else if( !show && m_needs_suspending == true )
|
||||
{
|
||||
m_needs_suspending = false;
|
||||
CoreThread.Resume();
|
||||
}
|
||||
|
||||
if( show && m_panel_mcdlist )
|
||||
m_panel_mcdlist->OnShown();
|
||||
|
||||
|
|
Loading…
Reference in New Issue