changed ConfigMain and ogl config.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1067 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman
2008-11-04 09:56:25 +00:00
parent 1473512180
commit b6b61f0a9f
11 changed files with 296 additions and 461 deletions

View File

@ -194,7 +194,7 @@ void CEXIMemoryCard::SetCS(int cs)
if (m_uPosition > 2)
{
memset(memory_card_content, 0xFF, memory_card_size);
status &= ~0x80;
status &= ~MC_STATUS_BUSY;
}
break;

View File

@ -80,7 +80,6 @@ void AboutDolphin::CreateGUIControls()
this->SetSizer(sMain);
sMain->Layout();
SetIcon(wxNullIcon);
CenterOnParent();
Fit();
}

View File

@ -26,9 +26,7 @@
BEGIN_EVENT_TABLE(CConfigMain, wxDialog)
EVT_CLOSE(CConfigMain::OnClose)
EVT_BUTTON(ID_OK, CConfigMain::OKClick)
EVT_BUTTON(ID_APPLY, CConfigMain::OKClick)
EVT_BUTTON(ID_CANCEL, CConfigMain::OKClick)
EVT_BUTTON(ID_CLOSE, CConfigMain::CloseClick)
EVT_CHECKBOX(ID_ALLWAYS_HLEBIOS, CConfigMain::CoreSettingsChanged)
EVT_CHECKBOX(ID_USEDYNAREC, CConfigMain::CoreSettingsChanged)
EVT_CHECKBOX(ID_USEDUALCORE, CConfigMain::CoreSettingsChanged)
@ -63,7 +61,7 @@ CConfigMain::CConfigMain(wxWindow* parent, wxWindowID id, const wxString& title,
: wxDialog(parent, id, title, position, size, style)
{
bRefreshList = false;
// Load Wii SYSCONF
pStream = NULL;
pStream = fopen("./WII/shared2/sys/SYSCONF", "rb");
@ -86,6 +84,10 @@ CConfigMain::~CConfigMain()
void CConfigMain::CreateGUIControls()
{
// Why does this not work? some restriction is needed so that huge
// ISO paths dont cause the dialog to become gargantuan
SetMaxSize(wxSize(350, 350));
Notebook = new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize);
GeneralPage = new wxPanel(Notebook, ID_GENERALPAGE, wxDefaultPosition, wxDefaultSize);
@ -99,17 +101,12 @@ void CConfigMain::CreateGUIControls()
PluginPage = new wxPanel(Notebook, ID_PLUGINPAGE, wxDefaultPosition, wxDefaultSize);
Notebook->AddPage(PluginPage, wxT("Plugins"));
OK = new wxButton(this, ID_OK, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
Cancel = new wxButton(this, ID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
Apply = new wxButton(this, ID_APPLY, wxT("Apply"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
Apply->Disable();
m_Close = new wxButton(this, ID_CLOSE, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
wxBoxSizer* sButtons;
sButtons = new wxBoxSizer(wxHORIZONTAL);
sButtons->Add(0, 0, 1, wxEXPAND, 5);
sButtons->Add(OK, 0, wxALL, 5);
sButtons->Add(Cancel, 0, wxALL, 5);
sButtons->Add(Apply, 0, wxALL, 5);
sButtons->Add(m_Close, 0, wxALL, 5);
wxBoxSizer* sMain;
sMain = new wxBoxSizer(wxVERTICAL);
@ -125,7 +122,7 @@ void CConfigMain::CreateGUIControls()
UseDualCore->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bUseDualCore);
SkipIdle = new wxCheckBox(GeneralPage, ID_IDLESKIP, wxT("Enable Idle Skipping"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
SkipIdle->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle);
EnableCheats = new wxCheckBox(GeneralPage, ID_ENABLECHEATS, wxT("Enable cheats"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
EnableCheats = new wxCheckBox(GeneralPage, ID_ENABLECHEATS, wxT("Enable Cheats"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
EnableCheats->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats);
sbAdvanced = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, wxT("Advanced Settings"));
@ -300,46 +297,31 @@ void CConfigMain::CreateGUIControls()
sPlugins->Add(sbWiimotePlugin, 0, wxEXPAND|wxALL, 5);
PluginPage->SetSizer(sPlugins);
sPlugins->Layout();
SetIcon(wxNullIcon);
Fit();
Center();
}
void CConfigMain::OnClose(wxCloseEvent& WXUNUSED (event))
{
Destroy();
// Save Wii SYSCONF
pStream = NULL;
pStream = fopen("./WII/shared2/sys/SYSCONF", "wb");
if (pStream != NULL)
{
fwrite(m_SYSCONF, 1, 0x4000, pStream);
fclose(pStream);
}
else
{
PanicAlert("Could not write to Wii SYSCONF");
}
}
void CConfigMain::OKClick(wxCommandEvent& event)
void CConfigMain::CloseClick(wxCommandEvent& WXUNUSED (event))
{
switch (event.GetId())
{
case ID_OK:
DoApply();
Destroy();
// Save Wii SYSCONF
pStream = NULL;
pStream = fopen("./WII/shared2/sys/SYSCONF", "wb");
if (pStream != NULL)
{
fwrite(m_SYSCONF, 1, 0x4000, pStream);
fclose(pStream);
}
else
{
PanicAlert("Could not write to Wii SYSCONF");
}
break;
case ID_APPLY:
DoApply();
break;
case ID_CANCEL:
Destroy();
break;
}
Close();
}
void CConfigMain::CoreSettingsChanged(wxCommandEvent& event)
@ -464,7 +446,10 @@ void CConfigMain::DVDRootChanged(wxFileDirPickerEvent& WXUNUSED (event))
void CConfigMain::OnSelectionChanged(wxCommandEvent& WXUNUSED (event))
{
Apply->Enable();
GetFilename(GraphicSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin);
GetFilename(DSPSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin);
GetFilename(PADSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin);
GetFilename(WiimoteSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin);
}
void CConfigMain::OnConfig(wxCommandEvent& event)
@ -529,18 +514,6 @@ void CConfigMain::CallConfig(wxChoice* _pChoice)
}
}
void CConfigMain::DoApply()
{
Apply->Disable();
GetFilename(GraphicSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin);
GetFilename(DSPSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin);
GetFilename(PADSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin);
GetFilename(WiimoteSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin);
SConfig::GetInstance().SaveSettings();
}
bool CConfigMain::GetFilename(wxChoice* _pChoice, std::string& _rFilename)
{
_rFilename.clear();

View File

@ -35,7 +35,7 @@ class CConfigMain
CConfigMain(wxWindow* parent, wxWindowID id = 1, const wxString& title = wxT("Dolphin Configuration"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = CONFIG_MAIN_STYLE);
virtual ~CConfigMain();
void OKClick(wxCommandEvent& event);
void CloseClick(wxCommandEvent& event);
void OnSelectionChanged(wxCommandEvent& event);
void OnConfig(wxCommandEvent& event);
@ -73,9 +73,7 @@ class CConfigMain
wxPanel *PathsPage;
wxPanel *PluginPage;
wxButton* OK;
wxButton* Cancel;
wxButton* Apply;
wxButton* m_Close;
wxCheckBox* AllwaysHLEBIOS;
wxCheckBox* UseDynaRec;
@ -190,9 +188,7 @@ class CConfigMain
ID_WIIPAGE,
ID_PATHSPAGE,
ID_PLUGINPAGE,
ID_CANCEL,
ID_APPLY,
ID_OK,
ID_CLOSE,
ID_ALLWAYS_HLEBIOS,
ID_USEDYNAREC,
ID_USEDUALCORE,
@ -227,16 +223,14 @@ class CConfigMain
ID_PAD_ABOUT ,
ID_PAD_CONFIG,
ID_PAD_CB,
ID_DSP_ABOUT ,
ID_DSP_ABOUT,
ID_DSP_CONFIG,
ID_DSP_TEXT,
ID_DSP_CB,
ID_GRAPHIC_ABOUT ,
ID_GRAPHIC_ABOUT,
ID_GRAPHIC_CONFIG,
ID_GRAPHIC_TEXT,
ID_GRAPHIC_CB,
ID_DUMMY_VALUE_ //don't remove this value unless you have other enum values
ID_GRAPHIC_CB
};
void CreateGUIControls();
@ -252,9 +246,6 @@ class CConfigMain
void FillChoiceBox(wxChoice* _pChoice, int _PluginType, const std::string& _SelectFilename);
void CallConfig(wxChoice* _pChoice);
//void CallAbout(wxChoice* _pChoice);
void DoApply();
bool GetFilename(wxChoice* _pChoice, std::string& _rFilename);
};

View File

@ -383,18 +383,8 @@ void CFrame::OnHelp(wxCommandEvent& event)
{
case IDM_HELPABOUT:
{
#ifdef _WIN32
wxWindow win;
win.SetHWND(this->GetHWND());
AboutDolphin frame(&win);
frame.ShowModal();
win.SetHWND(0);
#else
wxWindow win;
AboutDolphin frame(&win);
frame.ShowModal();
#endif
AboutDolphin frame(this);
frame.ShowModal();
break;
}
case IDM_HELPWEBSITE:

View File

@ -572,7 +572,7 @@ void CGameListCtrl::OnDeleteGCM(wxCommandEvent& WXUNUSED (event))
const GameListItem *iso = GetSelectedISO();
if (!iso)
return;
if (wxMessageBox(_T("Are you sure you want to delete this file?"),
if (wxMessageBox(_T("Are you sure you want to delete this file?\nIt will be gone forever!"),
wxMessageBoxCaptionStr, wxYES_NO|wxICON_EXCLAMATION) == wxYES)
{
File::Delete(iso->GetFileName().c_str());