IPC: Fix type polymorphism & checkbox

This commit is contained in:
Gauvain 'GovanifY' Roussel-Tarbouriech 2021-03-06 16:48:50 +01:00 committed by Kojin
parent 862518e7da
commit d24450f4a9
2 changed files with 5 additions and 5 deletions

View File

@ -49,10 +49,10 @@ Dialogs::IPCDialog::IPCDialog(wxWindow* parent)
void Dialogs::IPCDialog::OnConfirm(wxCommandEvent& evt)
{
wxTextCtrl* textbox = dynamic_cast<wxTextCtrl*>(evt.GetEventObject());
if (textbox)
wxTextCtrl* obj = static_cast<wxTextCtrl*>(evt.GetEventObject());
if (obj != nullptr)
{
IPCSettings::slot = (unsigned int)atoi(textbox->GetValue().ToUTF8().data());
IPCSettings::slot = (unsigned int)atoi(obj->GetValue().ToUTF8().data());
Destroy();
}
}

View File

@ -394,9 +394,9 @@ void MainEmuFrame::CreatePcsx2Menu()
m_GameSettingsSubmenu.Append(MenuId_EnableCheats, _("Enable &Cheats"),
_("Use cheats otherwise known as pnachs from the cheats folder."), wxITEM_CHECK);
m_GameSettingsSubmenu.Append(MenuId_IPC_Enable, _("Configure &IPC"), &m_submenuIPC);
m_GameSettingsSubmenu.Append(MenuId_IPC, _("Configure &IPC"), &m_submenuIPC);
m_submenuIPC.Append(MenuId_IPC, _("&Enable IPC"),
m_submenuIPC.Append(MenuId_IPC_Enable, _("&Enable IPC"),
wxEmptyString, wxITEM_CHECK);
m_submenuIPC.Append(MenuId_IPC_Settings, _("IPC &Settings"));