Minor fixes to selecting isos and changing cdvd source types.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2916 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2010-04-27 16:20:49 +00:00
parent bd76de1a8b
commit c7ab69571b
3 changed files with 52 additions and 34 deletions

View File

@ -13,7 +13,6 @@
del /s "%~dp0\*.ncb" del /s "%~dp0\*.ncb"
del /s "%~dp0\*.obj" del /s "%~dp0\*.obj"
del /s "%~dp0\*.tmp"
del /s "%~dp0\bin\*.ilk" del /s "%~dp0\bin\*.ilk"
del /s "%~dp0\*.idb" del /s "%~dp0\*.idb"
del /s "%~dp0\*.bsc" del /s "%~dp0\*.bsc"
@ -22,3 +21,9 @@ del /s "%~dp0\*.pch"
del /s "%~dp0\*.pdb" del /s "%~dp0\*.pdb"
del /s /q "%~dp0\deps" del /s /q "%~dp0\deps"
:: These two can't be used currently because they match unwanted 4+ letter extensions, such
:: as *.resx and *.tmpl ... wow, stupid. >_<
:: del /s "%~dp0\*.tmp"
:: del /s "%~dp0\*.res"

View File

@ -162,7 +162,7 @@ void pxEvtHandler::PostEvent( SysExecEvent* evt )
ScopedLock synclock( m_mtx_pending ); ScopedLock synclock( m_mtx_pending );
DbgCon.WriteLn( L"(%s) Posting event: %s (queue count=%d)", GetEventHandlerName().c_str(), evt->GetEventName().c_str(), m_pendingEvents.size() ); //DbgCon.WriteLn( L"(%s) Posting event: %s (queue count=%d)", GetEventHandlerName().c_str(), evt->GetEventName().c_str(), m_pendingEvents.size() );
m_pendingEvents.push_back( evt ); m_pendingEvents.push_back( evt );
if( m_pendingEvents.size() == 1) if( m_pendingEvents.size() == 1)

View File

@ -133,7 +133,13 @@ void MainEmuFrame::Menu_ResetAllSettings_Click(wxCommandEvent &event)
// (anything else) - Standard swap, no reset. (hotswap!) // (anything else) - Standard swap, no reset. (hotswap!)
wxWindowID SwapOrReset_Iso( wxWindow* owner, IScopedCoreThread& core_control, const wxString& isoFilename, const wxString& descpart1 ) wxWindowID SwapOrReset_Iso( wxWindow* owner, IScopedCoreThread& core_control, const wxString& isoFilename, const wxString& descpart1 )
{ {
wxWindowID result = wxID_RESET; wxWindowID result = wxID_CANCEL;
if( g_Conf->CdvdSource == CDVDsrc_Iso && isoFilename == g_Conf->CurrentIso )
{
core_control.AllowResume();
return result;
}
if( SysHasValidState() ) if( SysHasValidState() )
{ {
@ -146,24 +152,26 @@ wxWindowID SwapOrReset_Iso( wxWindow* owner, IScopedCoreThread& core_control, co
); );
result = pxIssueConfirmation( dialog, MsgButtons().Reset().Cancel().Custom(_("Swap Disc")), L"DragDrop:BootSwapIso" ); result = pxIssueConfirmation( dialog, MsgButtons().Reset().Cancel().Custom(_("Swap Disc")), L"DragDrop:BootSwapIso" );
if( result == wxID_CANCEL )
{
core_control.AllowResume();
return result;
}
} }
if( result != wxID_CANCEL ) SysUpdateIsoSrcFile( isoFilename );
if( result != wxID_RESET )
{ {
SysUpdateIsoSrcFile( isoFilename ); Console.Indent().WriteLn( "HotSwapping to new ISO src image!" );
if( result != wxID_RESET ) g_Conf->CdvdSource = CDVDsrc_Iso;
{ sMainFrame.UpdateIsoSrcSelection();
Console.Indent().WriteLn( "HotSwapping to new ISO src image!" ); CoreThread.ChangeCdvdSource();
g_Conf->CdvdSource = CDVDsrc_Iso; core_control.AllowResume();
sMainFrame.UpdateIsoSrcSelection(); }
CoreThread.ChangeCdvdSource(); else
core_control.AllowResume(); {
} core_control.DisallowResume();
else sApp.SysExecute( CDVDsrc_Iso );
{
core_control.DisallowResume();
sApp.SysExecute( CDVDsrc_Iso );
}
} }
return result; return result;
@ -188,23 +196,27 @@ wxWindowID SwapOrReset_CdvdSrc( wxWindow* owner, CDVD_SourceType newsrc )
); );
result = pxIssueConfirmation( dialog, MsgButtons().Reset().Cancel().Custom(_("Swap Disc")), L"DragDrop:BootSwapIso" ); result = pxIssueConfirmation( dialog, MsgButtons().Reset().Cancel().Custom(_("Swap Disc")), L"DragDrop:BootSwapIso" );
if( result == wxID_CANCEL )
{
core.AllowResume();
return result;
}
} }
if( result != wxID_CANCEL ) CDVD_SourceType oldsrc = g_Conf->CdvdSource;
g_Conf->CdvdSource = newsrc;
if( result != wxID_RESET )
{ {
if( result != wxID_RESET ) Console.Indent().WriteLn( L"(CdvdSource) HotSwapping CDVD source types from %s to %s.", CDVD_SourceLabels[oldsrc], CDVD_SourceLabels[newsrc] );
{ CoreThread.ChangeCdvdSource();
Console.Indent().WriteLn( L"(CdvdSource) HotSwapping CDVD source types from %s to %s.", CDVD_SourceLabels[g_Conf->CdvdSource], CDVD_SourceLabels[newsrc] ); core.AllowResume();
g_Conf->CdvdSource = newsrc; }
CoreThread.ChangeCdvdSource(); else
core.AllowResume(); {
} core.DisallowResume();
else sApp.SysExecute( g_Conf->CdvdSource );
{
core.DisallowResume();
g_Conf->CdvdSource = newsrc;
sApp.SysExecute( newsrc );
}
} }
return result; return result;
@ -341,12 +353,13 @@ void MainEmuFrame::Menu_IsoBrowse_Click( wxCommandEvent &event )
ScopedCoreThreadPopup core; ScopedCoreThreadPopup core;
wxString isofile; wxString isofile;
if( !_DoSelectIsoBrowser(isofile) || if( !_DoSelectIsoBrowser(isofile) )
(wxID_CANCEL == SwapOrReset_Iso(this, core, isofile, GetMsg_IsoImageChanged())) )
{ {
core.AllowResume(); core.AllowResume();
return; return;
} }
SwapOrReset_Iso(this, core, isofile, GetMsg_IsoImageChanged());
} }
void MainEmuFrame::Menu_MultitapToggle_Click( wxCommandEvent& ) void MainEmuFrame::Menu_MultitapToggle_Click( wxCommandEvent& )