mirror of https://github.com/PCSX2/pcsx2.git
MCD manager: should be final.
1. Restored multitap 1/2 checkboxes to the main menu. 2. Console messages now appear only on apply and only for active cards. 3. Shorter confirmation message for "duplicate card". git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4458 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
de3333df6c
commit
2628a03cdd
|
@ -131,8 +131,8 @@ enum MenuIdentifiers
|
|||
MenuId_Config_DEV9,
|
||||
MenuId_Config_Patches,
|
||||
|
||||
//MenuId_Config_Multitap0Toggle,
|
||||
//MenuId_Config_Multitap1Toggle,
|
||||
MenuId_Config_Multitap0Toggle,
|
||||
MenuId_Config_Multitap1Toggle,
|
||||
|
||||
// Plugin Sections
|
||||
// ---------------
|
||||
|
|
|
@ -143,7 +143,7 @@ namespace Dialogs
|
|||
|
||||
protected:
|
||||
virtual wxString& GetConfSettingsTabName() const { return g_Conf->McdSettingsTabName; }
|
||||
void OnMultitapClicked( wxCommandEvent& evt );
|
||||
//void OnMultitapClicked( wxCommandEvent& evt );
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
|
|
@ -45,7 +45,7 @@ Panels::McdConfigPanel_Toggles::McdConfigPanel_Toggles(wxWindow *parent)
|
|||
);
|
||||
|
||||
//m_check_SavestateBackup = new pxCheckBox( this, pxsFmt(_("Backup existing Savestate when creating a new one")) );
|
||||
|
||||
/*
|
||||
for( uint i=0; i<2; ++i )
|
||||
{
|
||||
m_check_Multitap[i] = new pxCheckBox( this, pxsFmt(_("Use Multitap on Port %u"), i+1) );
|
||||
|
@ -63,7 +63,7 @@ Panels::McdConfigPanel_Toggles::McdConfigPanel_Toggles(wxWindow *parent)
|
|||
//*this += 4;
|
||||
|
||||
//*this += m_check_SavestateBackup;
|
||||
|
||||
*/
|
||||
*this += 4;
|
||||
*this += new wxStaticLine( this ) | StdExpand();
|
||||
|
||||
|
@ -72,8 +72,8 @@ Panels::McdConfigPanel_Toggles::McdConfigPanel_Toggles(wxWindow *parent)
|
|||
|
||||
void Panels::McdConfigPanel_Toggles::Apply()
|
||||
{
|
||||
g_Conf->EmuOptions.MultitapPort0_Enabled = m_check_Multitap[0]->GetValue();
|
||||
g_Conf->EmuOptions.MultitapPort1_Enabled = m_check_Multitap[1]->GetValue();
|
||||
// g_Conf->EmuOptions.MultitapPort0_Enabled = m_check_Multitap[0]->GetValue();
|
||||
// g_Conf->EmuOptions.MultitapPort1_Enabled = m_check_Multitap[1]->GetValue();
|
||||
|
||||
//g_Conf->EmuOptions.BackupSavestate = m_check_SavestateBackup->GetValue();
|
||||
g_Conf->EmuOptions.McdEnableEjection = m_check_Ejection->GetValue();
|
||||
|
@ -81,8 +81,8 @@ void Panels::McdConfigPanel_Toggles::Apply()
|
|||
|
||||
void Panels::McdConfigPanel_Toggles::AppStatusEvent_OnSettingsApplied()
|
||||
{
|
||||
m_check_Multitap[0] ->SetValue( g_Conf->EmuOptions.MultitapPort0_Enabled );
|
||||
m_check_Multitap[1] ->SetValue( g_Conf->EmuOptions.MultitapPort1_Enabled );
|
||||
// m_check_Multitap[0] ->SetValue( g_Conf->EmuOptions.MultitapPort0_Enabled );
|
||||
// m_check_Multitap[1] ->SetValue( g_Conf->EmuOptions.MultitapPort1_Enabled );
|
||||
|
||||
//m_check_SavestateBackup ->SetValue( g_Conf->EmuOptions.BackupSavestate );
|
||||
m_check_Ejection ->SetValue( g_Conf->EmuOptions.McdEnableEjection );
|
||||
|
@ -123,13 +123,13 @@ Dialogs::McdConfigDialog::McdConfigDialog( wxWindow* parent )
|
|||
*s_bottom += new McdConfigPanel_Toggles( this ) | StdExpand();
|
||||
|
||||
*this+= s_bottom | StdExpand();
|
||||
|
||||
/*
|
||||
for( uint i=0; i<2; ++i )
|
||||
{
|
||||
if( pxCheckBox* check = (pxCheckBox*)FindWindow(pxsFmt( L"CheckBox::Multitap%u", i )) )
|
||||
Connect( check->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(McdConfigDialog::OnMultitapClicked) );
|
||||
}
|
||||
|
||||
*/
|
||||
AddOkCancel(s_bottom);
|
||||
|
||||
//make this dialog fit to current elements (else can be shrinked too much)
|
||||
|
@ -137,7 +137,7 @@ Dialogs::McdConfigDialog::McdConfigDialog( wxWindow* parent )
|
|||
// So using the "bigger" method: SetSizerAndFit, with existing sizer (set earlier to s_flex) - avih]
|
||||
SetSizerAndFit(GetSizer());
|
||||
}
|
||||
|
||||
/*
|
||||
void Dialogs::McdConfigDialog::OnMultitapClicked( wxCommandEvent& evt )
|
||||
{
|
||||
evt.Skip();
|
||||
|
@ -146,7 +146,7 @@ void Dialogs::McdConfigDialog::OnMultitapClicked( wxCommandEvent& evt )
|
|||
if( pxCheckBox* box = (pxCheckBox*)evt.GetEventObject() )
|
||||
m_panel_mcdlist->SetMultitapEnabled( (int)box->GetClientData(), box->IsChecked() );
|
||||
}
|
||||
|
||||
*/
|
||||
bool Dialogs::McdConfigDialog::Show( bool show )
|
||||
{
|
||||
// Suspend the emulation before any file operations on the memory cards can be done.
|
||||
|
|
|
@ -183,8 +183,8 @@ void MainEmuFrame::ConnectMenus()
|
|||
ConnectMenu( MenuId_Config_Language, Menu_Language_Click );
|
||||
ConnectMenu( MenuId_Config_ResetAll, Menu_ResetAllSettings_Click );
|
||||
|
||||
// ConnectMenu( MenuId_Config_Multitap0Toggle, Menu_MultitapToggle_Click );
|
||||
// ConnectMenu( MenuId_Config_Multitap1Toggle, Menu_MultitapToggle_Click );
|
||||
ConnectMenu( MenuId_Config_Multitap0Toggle, Menu_MultitapToggle_Click );
|
||||
ConnectMenu( MenuId_Config_Multitap1Toggle, Menu_MultitapToggle_Click );
|
||||
|
||||
ConnectMenu( MenuId_Video_WindowSettings, Menu_WindowSettings_Click );
|
||||
ConnectMenu( MenuId_Video_CoreSettings, Menu_GSSettings_Click );
|
||||
|
@ -461,9 +461,9 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
|
|||
m_menuConfig.AppendSeparator();
|
||||
m_menuConfig.Append(MenuId_Config_Patches, _("Patches (unimplemented)"), wxEmptyString);
|
||||
|
||||
// m_menuConfig.AppendSeparator();
|
||||
// m_menuConfig.Append(MenuId_Config_Multitap0Toggle, _("Multitap 1"), wxEmptyString, wxITEM_CHECK );
|
||||
// m_menuConfig.Append(MenuId_Config_Multitap1Toggle, _("Multitap 2"), wxEmptyString, wxITEM_CHECK );
|
||||
m_menuConfig.AppendSeparator();
|
||||
m_menuConfig.Append(MenuId_Config_Multitap0Toggle, _("Multitap 1"), wxEmptyString, wxITEM_CHECK );
|
||||
m_menuConfig.Append(MenuId_Config_Multitap1Toggle, _("Multitap 2"), wxEmptyString, wxITEM_CHECK );
|
||||
|
||||
m_menuConfig.AppendSeparator();
|
||||
m_menuConfig.Append(MenuId_Config_ResetAll, _("Clear all settings..."),
|
||||
|
@ -658,8 +658,8 @@ void MainEmuFrame::ApplyConfigToGui(AppConfig& configToApply, int flags)
|
|||
menubar.Check( MenuId_Console_Stdio, configToApply.EmuOptions.ConsoleToStdio );
|
||||
#endif
|
||||
|
||||
// menubar.Check( MenuId_Config_Multitap0Toggle, configToApply.EmuOptions.MultitapPort0_Enabled );
|
||||
// menubar.Check( MenuId_Config_Multitap1Toggle, configToApply.EmuOptions.MultitapPort1_Enabled );
|
||||
menubar.Check( MenuId_Config_Multitap0Toggle, configToApply.EmuOptions.MultitapPort0_Enabled );
|
||||
menubar.Check( MenuId_Config_Multitap1Toggle, configToApply.EmuOptions.MultitapPort1_Enabled );
|
||||
}
|
||||
|
||||
UpdateIsoSrcSelection(); //shouldn't be affected by presets but updates from g_Conf anyway and not from configToApply, so no problem here.
|
||||
|
|
|
@ -195,7 +195,7 @@ protected:
|
|||
|
||||
void Menu_ConfigPlugin_Click(wxCommandEvent &event);
|
||||
|
||||
//void Menu_MultitapToggle_Click(wxCommandEvent &event);
|
||||
void Menu_MultitapToggle_Click(wxCommandEvent &event);
|
||||
|
||||
void Menu_Debug_Open_Click(wxCommandEvent &event);
|
||||
void Menu_Debug_MemoryDump_Click(wxCommandEvent &event);
|
||||
|
|
|
@ -395,7 +395,7 @@ void MainEmuFrame::Menu_IsoBrowse_Click( wxCommandEvent &event )
|
|||
AppSaveSettings(); // save the new iso selection; update menus!
|
||||
}
|
||||
|
||||
/*//now only available at the memory card manager.
|
||||
|
||||
void MainEmuFrame::Menu_MultitapToggle_Click( wxCommandEvent& )
|
||||
{
|
||||
g_Conf->EmuOptions.MultitapPort0_Enabled = GetMenuBar()->IsChecked( MenuId_Config_Multitap0Toggle );
|
||||
|
@ -405,7 +405,6 @@ void MainEmuFrame::Menu_MultitapToggle_Click( wxCommandEvent& )
|
|||
|
||||
//evt.Skip();
|
||||
}
|
||||
*/
|
||||
|
||||
void MainEmuFrame::Menu_EnableBackupStates_Click( wxCommandEvent& )
|
||||
{
|
||||
|
|
|
@ -53,7 +53,7 @@ bool EnumerateMemoryCard( McdSlotItem& dest, const wxFileName& filename, const w
|
|||
const wxString fullpath( filename.GetFullPath() );
|
||||
if( !filename.FileExists() ) return false;
|
||||
|
||||
Console.WriteLn( fullpath );
|
||||
DevCon.WriteLn( fullpath );
|
||||
wxFFile mcdFile( fullpath );
|
||||
if( !mcdFile.IsOpened() ) return false; // wx should log the error for us.
|
||||
if( mcdFile.Length() < (1024*528) )
|
||||
|
@ -439,7 +439,7 @@ Panels::MemoryCardListPanel_Simple::MemoryCardListPanel_Simple( wxWindow* parent
|
|||
|
||||
m_listview = new MemoryCardListView_Simple(this);
|
||||
|
||||
m_listview->SetMinSize(wxSize(600, m_listview->GetCharHeight() * 13)); // 740 is nice for default font sizes
|
||||
m_listview->SetMinSize(wxSize(620, m_listview->GetCharHeight() * 13)); // 740 is nice for default font sizes
|
||||
|
||||
m_listview->SetDropTarget( new McdDropTarget(m_listview) );
|
||||
|
||||
|
@ -561,6 +561,8 @@ void Panels::MemoryCardListPanel_Simple::Apply()
|
|||
ScopedCoreThreadClose closed_core;
|
||||
closed_core.AllowResume();
|
||||
|
||||
int used=0;
|
||||
Console.WriteLn( L"Apply Memory cards:" );
|
||||
for( uint slot=0; slot<8; ++slot )
|
||||
{
|
||||
g_Conf->Mcd[slot].Enabled = m_Cards[slot].IsEnabled && m_Cards[slot].IsPresent;
|
||||
|
@ -568,7 +570,15 @@ void Panels::MemoryCardListPanel_Simple::Apply()
|
|||
g_Conf->Mcd[slot].Filename = m_Cards[slot].Filename;
|
||||
else
|
||||
g_Conf->Mcd[slot].Filename = L"";
|
||||
|
||||
if( g_Conf->Mcd[slot].Enabled )
|
||||
{
|
||||
used++;
|
||||
Console.WriteLn( L"slot[%d]='%s'", slot, g_Conf->Mcd[slot].Filename.GetFullName().c_str() );
|
||||
}
|
||||
}
|
||||
if( !used )
|
||||
Console.WriteLn( L"No active slots" );
|
||||
|
||||
SetForceMcdEjectTimeoutNow();
|
||||
|
||||
|
@ -794,7 +804,7 @@ bool Panels::MemoryCardListPanel_Simple::UiDuplicateCard(McdSlotItem& src, McdSl
|
|||
|
||||
// Destination memcard isEnabled state is the same now as the source's
|
||||
wxString success;
|
||||
success.Printf(_("Memory card '%s' duplicated to '%s'.\n\nBoth card files are now identical."),
|
||||
success.Printf(_("Memory card '%s' duplicated to '%s'."),
|
||||
src.Filename.GetFullName().c_str(),
|
||||
dest.Filename.GetFullName().c_str()
|
||||
);
|
||||
|
|
|
@ -280,7 +280,7 @@ namespace Panels
|
|||
typedef BaseApplicableConfigPanel _parent;
|
||||
|
||||
protected:
|
||||
pxCheckBox* m_check_Multitap[2];
|
||||
//pxCheckBox* m_check_Multitap[2];
|
||||
pxCheckBox* m_check_Ejection;
|
||||
|
||||
//moved to the system menu, just below "Save State"
|
||||
|
|
Loading…
Reference in New Issue