hopefully this makes my intentions more clear :p
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@699 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
20a8b21800
commit
64f6b82ad5
|
@ -206,8 +206,7 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
|
|||
// Fix checksums and save the changes
|
||||
memoryCard[0]->FixChecksums();
|
||||
memoryCard[0]->Save();
|
||||
wxMessageBox(wxT("The checksum was successfully fixed"),
|
||||
wxT("Message"), wxOK);
|
||||
wxMessageBox(wxT("The checksum was successfully fixed"), wxT("Message"), wxOK);
|
||||
}
|
||||
break;
|
||||
case ID_DELETERIGHT:
|
||||
|
|
|
@ -47,24 +47,24 @@ void DInput::DIKToString(unsigned int keycode, char *keyStr)
|
|||
case DIK_RIGHT:
|
||||
sprintf(keyStr, "Right");
|
||||
break;
|
||||
case DIK_HOME:
|
||||
strcpy(keyStr, "Home");
|
||||
break;
|
||||
case DIK_END:
|
||||
strcpy(keyStr, "End");
|
||||
break;
|
||||
case DIK_INSERT:
|
||||
strcpy(keyStr, "Ins");
|
||||
break;
|
||||
case DIK_DELETE:
|
||||
strcpy(keyStr, "Del");
|
||||
break;
|
||||
case DIK_PGUP:
|
||||
strcpy(keyStr, "PgUp");
|
||||
break;
|
||||
case DIK_PGDN:
|
||||
strcpy(keyStr, "PgDn");
|
||||
break;
|
||||
case DIK_HOME:
|
||||
strcpy(keyStr, "Home");
|
||||
break;
|
||||
case DIK_END:
|
||||
strcpy(keyStr, "End");
|
||||
break;
|
||||
case DIK_INSERT:
|
||||
strcpy(keyStr, "Ins");
|
||||
break;
|
||||
case DIK_DELETE:
|
||||
strcpy(keyStr, "Del");
|
||||
break;
|
||||
case DIK_PGUP:
|
||||
strcpy(keyStr, "PgUp");
|
||||
break;
|
||||
case DIK_PGDN:
|
||||
strcpy(keyStr, "PgDn");
|
||||
break;
|
||||
case DIK_NUMPAD0:
|
||||
strcpy(keyStr, "Num 0");
|
||||
break;
|
||||
|
@ -98,8 +98,8 @@ void DInput::DIKToString(unsigned int keycode, char *keyStr)
|
|||
case DIK_NUMPADSLASH:
|
||||
strcpy(keyStr, "Num /");
|
||||
break;
|
||||
default:
|
||||
GetKeyNameText(keycode << 16, keyStr, 64);
|
||||
default:
|
||||
GetKeyNameText(keycode << 16, keyStr, 64);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ DInput m_dinput;
|
|||
BEGIN_EVENT_TABLE(ConfigDialog,wxDialog)
|
||||
EVT_CLOSE(ConfigDialog::OnClose)
|
||||
EVT_BUTTON(ID_CLOSE,ConfigDialog::OnCloseClick)
|
||||
EVT_CHOICE(ID_DEVICENAME,ConfigDialog::DeviceChanged)
|
||||
EVT_CHECKBOX(ID_ATTACHED,ConfigDialog::AttachedCheck)
|
||||
EVT_CHECKBOX(ID_DISABLE,ConfigDialog::DisableCheck)
|
||||
EVT_CHECKBOX(ID_RUMBLE,ConfigDialog::RumbleCheck)
|
||||
|
@ -160,14 +161,14 @@ void ConfigDialog::CreateGUIControls()
|
|||
AddControl(m_Controller[i], &(m_ButtonZ[i]), sButtons[i], "Z: ", CTL_Z, i);
|
||||
AddControl(m_Controller[i], &(m_ButtonStart[i]), sButtons[i], "Start: ", CTL_START, i);
|
||||
|
||||
sTriggerL[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("L Trigger"));
|
||||
sTriggerR[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("R Trigger"));
|
||||
sTriggers[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("Triggers"));
|
||||
|
||||
AddControl(m_Controller[i], &(m_TriggerL[i]), sTriggerL[i], "Analog: ", CTL_TRIGGER_L, i);
|
||||
AddControl(m_Controller[i], &(m_ButtonL[i]), sTriggerL[i], "Click: ", CTL_L, i);
|
||||
AddControl(m_Controller[i], &(m_ButtonL[i]), sTriggers[i], " L: ", CTL_L, i);
|
||||
AddControl(m_Controller[i], &(m_ButtonR[i]), sTriggers[i], " R: ", CTL_R, i);
|
||||
|
||||
AddControl(m_Controller[i], &(m_TriggerR[i]), sTriggerR[i], "Analog: ", CTL_TRIGGER_R, i);
|
||||
AddControl(m_Controller[i], &(m_ButtonR[i]), sTriggerR[i], "Click: ", CTL_R, i);
|
||||
sModifiers[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("Modifiers"));
|
||||
|
||||
AddControl(m_Controller[i], &(m_HalfPress[i]), sModifiers[i], "1/2 Press: ", CTL_L, i);
|
||||
|
||||
sStick[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("Main Stick"));
|
||||
|
||||
|
@ -194,9 +195,9 @@ void ConfigDialog::CreateGUIControls()
|
|||
sPage[i]->SetFlexibleDirection(wxBOTH);
|
||||
sPage[i]->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
|
||||
sPage[i]->Add(sDevice[i], wxGBPosition(0, 0), wxGBSpan(1, 5), wxEXPAND|wxALL, 1);
|
||||
sPage[i]->Add(sButtons[i], wxGBPosition(1, 0), wxGBSpan(3, 1), wxALL, 1);
|
||||
sPage[i]->Add(sTriggerL[i], wxGBPosition(1, 1), wxGBSpan(1, 1), wxALL, 1);
|
||||
sPage[i]->Add(sTriggerR[i], wxGBPosition(2, 1), wxGBSpan(1, 1), wxALL, 1);
|
||||
sPage[i]->Add(sButtons[i], wxGBPosition(1, 0), wxGBSpan(2, 1), wxALL, 1);
|
||||
sPage[i]->Add(sTriggers[i], wxGBPosition(1, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 1);
|
||||
sPage[i]->Add(sModifiers[i], wxGBPosition(2, 1), wxGBSpan(1, 1), wxALL, 1);
|
||||
sPage[i]->Add(sStick[i], wxGBPosition(1, 2), wxGBSpan(2, 1), wxALL, 1);
|
||||
sPage[i]->Add(sDPad[i], wxGBPosition(1, 3), wxGBSpan(2, 1), wxALL, 1);
|
||||
sPage[i]->Add(sCStick[i], wxGBPosition(1, 4), wxGBSpan(2, 1), wxALL, 1);
|
||||
|
@ -215,6 +216,7 @@ void ConfigDialog::OnClose(wxCloseEvent& event)
|
|||
#endif
|
||||
EndModal(0);
|
||||
}
|
||||
|
||||
void ConfigDialog::OnKeyDown(wxKeyEvent& event)
|
||||
{
|
||||
if(clickedButton != NULL)
|
||||
|
@ -244,11 +246,29 @@ void ConfigDialog::OnKeyDown(wxKeyEvent& event)
|
|||
clickedButton = NULL;
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void ConfigDialog::OnCloseClick(wxCommandEvent& event)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
void ConfigDialog::DeviceChanged(wxCommandEvent& event)
|
||||
{
|
||||
int page = m_Notebook->GetSelection();
|
||||
|
||||
if(event.GetSelection() == 0)
|
||||
{
|
||||
// Keyboard
|
||||
pad[page].type = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// XPad, so also set xpad number
|
||||
pad[page].type = 1;
|
||||
pad[page].XPad = event.GetSelection() + 1;
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigDialog::AttachedCheck(wxCommandEvent& event)
|
||||
{
|
||||
int page = m_Notebook->GetSelection();
|
||||
|
|
|
@ -41,10 +41,12 @@ class ConfigDialog : public wxDialog
|
|||
|
||||
|
||||
public:
|
||||
ConfigDialog(wxWindow *parent, wxWindowID id = 1, const wxString &title = wxT("Pad Configuration"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = CONFIGDIALOG_STYLE);
|
||||
ConfigDialog(wxWindow *parent, wxWindowID id = 1, const wxString &title = wxT("Pad Configuration"),
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = CONFIGDIALOG_STYLE);
|
||||
|
||||
virtual ~ConfigDialog();
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
wxNotebook *m_Notebook;
|
||||
wxPanel *m_Controller[4];
|
||||
|
@ -55,8 +57,8 @@ class ConfigDialog : public wxDialog
|
|||
wxBoxSizer *sDeviceBottom[4];
|
||||
wxGridBagSizer* sPage[4];
|
||||
wxStaticBoxSizer *sButtons[4];
|
||||
wxStaticBoxSizer *sTriggerL[4];
|
||||
wxStaticBoxSizer *sTriggerR[4];
|
||||
wxStaticBoxSizer *sTriggers[4];
|
||||
wxStaticBoxSizer *sModifiers[4];
|
||||
wxStaticBoxSizer *sStick[4];
|
||||
wxStaticBoxSizer *sCStick[4];
|
||||
wxStaticBoxSizer *sDPad[4];
|
||||
|
@ -72,10 +74,9 @@ class ConfigDialog : public wxDialog
|
|||
wxButton *m_ButtonY[4];
|
||||
wxButton *m_ButtonZ[4];
|
||||
wxButton *m_ButtonStart[4];
|
||||
wxButton *m_TriggerL[4];
|
||||
wxButton *m_ButtonL[4];
|
||||
wxButton *m_TriggerR[4];
|
||||
wxButton *m_ButtonR[4];
|
||||
wxButton *m_HalfPress[4];
|
||||
wxButton *m_StickUp[4];
|
||||
wxButton *m_StickDown[4];
|
||||
wxButton *m_StickLeft[4];
|
||||
|
@ -111,6 +112,7 @@ class ConfigDialog : public wxDialog
|
|||
void CreateGUIControls();
|
||||
void OnCloseClick(wxCommandEvent& event);
|
||||
void OnKeyDown(wxKeyEvent& event);
|
||||
void DeviceChanged(wxCommandEvent& event);
|
||||
void AttachedCheck(wxCommandEvent& event);
|
||||
void DisableCheck(wxCommandEvent& event);
|
||||
void RumbleCheck(wxCommandEvent& event);
|
||||
|
@ -118,8 +120,7 @@ class ConfigDialog : public wxDialog
|
|||
|
||||
int keyPress;
|
||||
wxButton *clickedButton;
|
||||
wxString oldLabel;
|
||||
/*DInput m_dinput;*/
|
||||
wxString oldLabel;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -55,8 +55,12 @@ void Config::Load()
|
|||
if (iAdapter == -1)
|
||||
iAdapter = 0;
|
||||
iniFile.Get("Hardware", "WindowedRes", &temp, 0);
|
||||
if(temp.empty())
|
||||
temp = "640x480";
|
||||
strcpy(iWindowedRes, temp.c_str());
|
||||
iniFile.Get("Hardware", "FullscreenRes", &temp, 0);
|
||||
if(temp.empty())
|
||||
temp = "640x480";
|
||||
strcpy(iFSResolution, temp.c_str());
|
||||
iniFile.Get("Hardware", "Fullscreen", &bFullscreen, 0);
|
||||
iniFile.Get("Hardware", "RenderToMainframe", &renderToMainframe, 0);
|
||||
|
|
Loading…
Reference in New Issue