Minor fixes to iso and cdvd source changing.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2947 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2010-05-04 22:12:25 +00:00
parent dfb301c1ba
commit 34b118738f
3 changed files with 11 additions and 4 deletions

View File

@ -71,6 +71,7 @@ protected:
FnPtr_CoreThreadMethod m_method; FnPtr_CoreThreadMethod m_method;
public: public:
wxString GetEventName() const { return L"CoreThreadMethod"; }
virtual ~SysExecEvent_InvokeCoreThreadMethod() throw() {} virtual ~SysExecEvent_InvokeCoreThreadMethod() throw() {}
SysExecEvent_InvokeCoreThreadMethod* Clone() const { return new SysExecEvent_InvokeCoreThreadMethod(*this); } SysExecEvent_InvokeCoreThreadMethod* Clone() const { return new SysExecEvent_InvokeCoreThreadMethod(*this); }

View File

@ -169,7 +169,6 @@ wxWindowID SwapOrReset_Iso( wxWindow* owner, IScopedCoreThread& core_control, co
{ {
Console.Indent().WriteLn( "HotSwapping to new ISO src image!" ); Console.Indent().WriteLn( "HotSwapping to new ISO src image!" );
g_Conf->CdvdSource = CDVDsrc_Iso; g_Conf->CdvdSource = CDVDsrc_Iso;
sMainFrame.UpdateIsoSrcSelection();
CoreThread.ChangeCdvdSource(); CoreThread.ChangeCdvdSource();
core_control.AllowResume(); core_control.AllowResume();
} }
@ -205,6 +204,7 @@ wxWindowID SwapOrReset_CdvdSrc( wxWindow* owner, CDVD_SourceType newsrc )
if( result == wxID_CANCEL ) if( result == wxID_CANCEL )
{ {
core.AllowResume(); core.AllowResume();
sMainFrame.UpdateIsoSrcSelection();
return result; return result;
} }
} }
@ -216,6 +216,7 @@ wxWindowID SwapOrReset_CdvdSrc( wxWindow* owner, CDVD_SourceType newsrc )
{ {
Console.Indent().WriteLn( L"(CdvdSource) HotSwapping CDVD source types from %s to %s.", CDVD_SourceLabels[oldsrc], CDVD_SourceLabels[newsrc] ); Console.Indent().WriteLn( L"(CdvdSource) HotSwapping CDVD source types from %s to %s.", CDVD_SourceLabels[oldsrc], CDVD_SourceLabels[newsrc] );
CoreThread.ChangeCdvdSource(); CoreThread.ChangeCdvdSource();
sMainFrame.UpdateIsoSrcSelection();
core.AllowResume(); core.AllowResume();
} }
else else
@ -348,7 +349,7 @@ void MainEmuFrame::Menu_BootCdvd2_Click( wxCommandEvent &event )
_DoBootCdvd(); _DoBootCdvd();
} }
static wxString GetMsg_IsoImageChanged() wxString GetMsg_IsoImageChanged()
{ {
return _("You have selected the following ISO image into PCSX2:\n\n"); return _("You have selected the following ISO image into PCSX2:\n\n");
} }
@ -365,6 +366,7 @@ void MainEmuFrame::Menu_IsoBrowse_Click( wxCommandEvent &event )
} }
SwapOrReset_Iso(this, core, isofile, GetMsg_IsoImageChanged()); SwapOrReset_Iso(this, core, isofile, GetMsg_IsoImageChanged());
AppSaveSettings(); // save the new iso selection; update menus!
} }
void MainEmuFrame::Menu_MultitapToggle_Click( wxCommandEvent& ) void MainEmuFrame::Menu_MultitapToggle_Click( wxCommandEvent& )

View File

@ -15,8 +15,11 @@
#include "PrecompiledHeader.h" #include "PrecompiledHeader.h"
#include "MainFrame.h" #include "MainFrame.h"
#include "IsoDropTarget.h"
#include "IniInterface.h" #include "IniInterface.h"
extern wxString GetMsg_IsoImageChanged();
// FIXME : This needs to handle removed/missing ISOs somehow, although I'm not sure the // FIXME : This needs to handle removed/missing ISOs somehow, although I'm not sure the
// best approach. I think I'd prefer for missing entries to only be removed when they // best approach. I think I'd prefer for missing entries to only be removed when they
// are selected. This also means we'll need to add some sort of "no current selection" // are selected. This also means we'll need to add some sort of "no current selection"
@ -57,8 +60,9 @@ void RecentIsoManager::OnChangedSelection( wxCommandEvent& evt )
// TODO: Dialog asking for hotswap or reset!!!! // TODO: Dialog asking for hotswap or reset!!!!
ScopedCoreThreadClose stopped_core; ScopedCoreThreadPopup stopped_core;
SysUpdateIsoSrcFile( m_Items[i].Filename ); //SysUpdateIsoSrcFile( m_Items[i].Filename );
SwapOrReset_Iso( m_Menu->GetWindow(), stopped_core, m_Items[i].Filename, GetMsg_IsoImageChanged());
stopped_core.AllowResume(); stopped_core.AllowResume();
} }