mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 17:49:48 -06:00
Several little fixes.
Fixed a segfault in linux when a cd/dvd drive is empty or invalid and "Boot from DVD" or "Show Drives" are selected. On all platforms if a game fails to load show the game list again. The other things here are essentially code cleanup and won't be noticeable by most users. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5204 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -129,10 +129,6 @@ GCPadConfigDialog::GCPadConfigDialog(wxWindow *parent, wxWindowID id, const wxSt
|
||||
#endif
|
||||
|
||||
UpdateGUI();
|
||||
|
||||
wxTheApp->Connect(wxID_ANY, wxEVT_KEY_DOWN, // Keyboard
|
||||
wxKeyEventHandler(GCPadConfigDialog::OnKeyDown),
|
||||
(wxObject*)0, this);
|
||||
}
|
||||
|
||||
GCPadConfigDialog::~GCPadConfigDialog()
|
||||
@ -245,10 +241,7 @@ void GCPadConfigDialog::OnKeyDown(wxKeyEvent& event)
|
||||
SaveButtonMapping(ClickedButton->GetId(), XKey);
|
||||
#endif
|
||||
}
|
||||
m_ButtonMappingTimer->Stop();
|
||||
GetButtonWaitingTimer = 0;
|
||||
GetButtonWaitingID = 0;
|
||||
ClickedButton = NULL;
|
||||
EndGetButtons();
|
||||
}
|
||||
}
|
||||
|
||||
@ -262,6 +255,10 @@ void GCPadConfigDialog::OnButtonClick(wxCommandEvent& event)
|
||||
|
||||
if (m_ButtonMappingTimer->IsRunning()) return;
|
||||
|
||||
wxTheApp->Connect(wxID_ANY, wxEVT_KEY_DOWN, // Keyboard
|
||||
wxKeyEventHandler(GCPadConfigDialog::OnKeyDown),
|
||||
(wxObject*)0, this);
|
||||
|
||||
// Create the button object
|
||||
ClickedButton = (wxButton *)event.GetEventObject();
|
||||
// Save old label so we can revert back
|
||||
|
@ -235,6 +235,7 @@ class GCPadConfigDialog : public wxDialog
|
||||
void ToBlank(bool ToBlank, int Id);
|
||||
|
||||
void DoGetButtons(int _GetId);
|
||||
void EndGetButtons();
|
||||
void SetButtonText(int id, const wxString &str);
|
||||
wxString GetButtonText(int id);
|
||||
};
|
||||
|
@ -208,10 +208,7 @@ void GCPadConfigDialog::DoGetButtons(int _GetId)
|
||||
{
|
||||
DEBUG_LOG(PAD, "Timer Stopped for Pad:%i _GetId:%i", GCMapping[m_Page].ID, _GetId);
|
||||
|
||||
m_ButtonMappingTimer->Stop();
|
||||
GetButtonWaitingTimer = 0;
|
||||
GetButtonWaitingID = 0;
|
||||
ClickedButton = NULL;
|
||||
EndGetButtons();
|
||||
}
|
||||
|
||||
// If we got a bad button
|
||||
@ -227,6 +224,17 @@ void GCPadConfigDialog::DoGetButtons(int _GetId)
|
||||
}
|
||||
}
|
||||
|
||||
void GCPadConfigDialog::EndGetButtons(void)
|
||||
{
|
||||
wxTheApp->Disconnect(wxID_ANY, wxEVT_KEY_DOWN, // Keyboard
|
||||
wxKeyEventHandler(GCPadConfigDialog::OnKeyDown),
|
||||
(wxObject*)0, this);
|
||||
m_ButtonMappingTimer->Stop();
|
||||
GetButtonWaitingTimer = 0;
|
||||
GetButtonWaitingID = 0;
|
||||
ClickedButton = NULL;
|
||||
}
|
||||
|
||||
// Convert the 0x8000 range values to BoxW and BoxH for the plot
|
||||
void GCPadConfigDialog::Convert2Box(int &x)
|
||||
{
|
||||
|
@ -355,8 +355,8 @@ void Initialize(void *init)
|
||||
}
|
||||
|
||||
void DoState(unsigned char **ptr, int mode) {
|
||||
#ifndef _WIN32
|
||||
// WHY is this here??
|
||||
#if !defined(_WIN32) && !defined(__linux__)
|
||||
// WHY is this here?? If macs don't need this it should be removed.
|
||||
OpenGL_MakeCurrent();
|
||||
#endif
|
||||
// Clear all caches that touch RAM
|
||||
|
@ -222,10 +222,7 @@ void WiimotePadConfigDialog::DoGetButtons(int _GetId)
|
||||
DEBUG_LOG(WIIMOTE, "Timer Stopped for Pad:%i _GetId:%i",
|
||||
WiiMoteEmu::WiiMapping[m_Page].ID, _GetId);
|
||||
|
||||
m_ButtonMappingTimer->Stop();
|
||||
GetButtonWaitingTimer = 0;
|
||||
GetButtonWaitingID = 0;
|
||||
ClickedButton = NULL;
|
||||
EndGetButtons();
|
||||
}
|
||||
|
||||
// If we got a bad button
|
||||
@ -241,6 +238,17 @@ void WiimotePadConfigDialog::DoGetButtons(int _GetId)
|
||||
}
|
||||
}
|
||||
|
||||
void WiimotePadConfigDialog::EndGetButtons(void)
|
||||
{
|
||||
wxTheApp->Disconnect(wxID_ANY, wxEVT_KEY_DOWN, // Keyboard
|
||||
wxKeyEventHandler(WiimotePadConfigDialog::OnKeyDown),
|
||||
(wxObject*)0, this);
|
||||
m_ButtonMappingTimer->Stop();
|
||||
GetButtonWaitingTimer = 0;
|
||||
GetButtonWaitingID = 0;
|
||||
ClickedButton = NULL;
|
||||
}
|
||||
|
||||
// Convert the 0x8000 range values to BoxW and BoxH for the plot
|
||||
void WiimotePadConfigDialog::Convert2Box(int &x)
|
||||
{
|
||||
|
@ -135,10 +135,6 @@ WiimotePadConfigDialog::WiimotePadConfigDialog(wxWindow *parent, wxWindowID id,
|
||||
m_Notebook->ChangeSelection(m_Page);
|
||||
// Set control values
|
||||
UpdateGUI();
|
||||
|
||||
wxTheApp->Connect(wxID_ANY, wxEVT_KEY_DOWN, // Keyboard
|
||||
wxKeyEventHandler(WiimotePadConfigDialog::OnKeyDown),
|
||||
(wxObject*)0, this);
|
||||
}
|
||||
|
||||
WiimotePadConfigDialog::~WiimotePadConfigDialog()
|
||||
@ -247,10 +243,7 @@ void WiimotePadConfigDialog::OnKeyDown(wxKeyEvent& event)
|
||||
SaveButtonMapping(ClickedButton->GetId(), XKey);
|
||||
#endif
|
||||
}
|
||||
m_ButtonMappingTimer->Stop();
|
||||
GetButtonWaitingTimer = 0;
|
||||
GetButtonWaitingID = 0;
|
||||
ClickedButton = NULL;
|
||||
EndGetButtons();
|
||||
}
|
||||
}
|
||||
|
||||
@ -264,6 +257,10 @@ void WiimotePadConfigDialog::OnButtonClick(wxCommandEvent& event)
|
||||
|
||||
if (m_ButtonMappingTimer->IsRunning()) return;
|
||||
|
||||
wxTheApp->Connect(wxID_ANY, wxEVT_KEY_DOWN, // Keyboard
|
||||
wxKeyEventHandler(WiimotePadConfigDialog::OnKeyDown),
|
||||
(wxObject*)0, this);
|
||||
|
||||
// Create the button object
|
||||
ClickedButton = (wxButton *)event.GetEventObject();
|
||||
// Save old label so we can revert back
|
||||
|
@ -288,6 +288,7 @@ class WiimotePadConfigDialog : public wxDialog
|
||||
wxString GetButtonText(int id);
|
||||
|
||||
void DoGetButtons(int id);
|
||||
void EndGetButtons();
|
||||
void UpdatePadInfo(wxTimerEvent& WXUNUSED(event));
|
||||
void ToBlank(bool ToBlank, int Id);
|
||||
void DoChangeDeadZone();
|
||||
|
Reference in New Issue
Block a user