mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Merge pull request #2157 from lioncash/leaks
DolphinWX: Allow input subsystems to correctly deinitialize
This commit is contained in:
@ -506,7 +506,7 @@ CFrame::CFrame(wxFrame* parent,
|
|||||||
g_pCodeWindow->UpdateButtonStates();
|
g_pCodeWindow->UpdateButtonStates();
|
||||||
|
|
||||||
// check if game is running
|
// check if game is running
|
||||||
m_bHotkeysInit = InitControllers();
|
InitControllers();
|
||||||
|
|
||||||
m_poll_hotkey_timer.SetOwner(this);
|
m_poll_hotkey_timer.SetOwner(this);
|
||||||
Bind(wxEVT_TIMER, &CFrame::PollHotkeys, this);
|
Bind(wxEVT_TIMER, &CFrame::PollHotkeys, this);
|
||||||
@ -515,14 +515,10 @@ CFrame::CFrame(wxFrame* parent,
|
|||||||
// Destructor
|
// Destructor
|
||||||
CFrame::~CFrame()
|
CFrame::~CFrame()
|
||||||
{
|
{
|
||||||
if (m_bHotkeysInit)
|
Wiimote::Shutdown();
|
||||||
{
|
Keyboard::Shutdown();
|
||||||
Wiimote::Shutdown();
|
Pad::Shutdown();
|
||||||
Keyboard::Shutdown();
|
HotkeyManagerEmu::Shutdown();
|
||||||
Pad::Shutdown();
|
|
||||||
HotkeyManagerEmu::Shutdown();
|
|
||||||
m_bHotkeysInit = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
drives.clear();
|
drives.clear();
|
||||||
|
|
||||||
@ -1268,10 +1264,7 @@ const CGameListCtrl *CFrame::GetGameListCtrl() const
|
|||||||
void CFrame::PollHotkeys(wxTimerEvent& event)
|
void CFrame::PollHotkeys(wxTimerEvent& event)
|
||||||
{
|
{
|
||||||
if (Core::GetState() == Core::CORE_UNINITIALIZED || Core::GetState() == Core::CORE_PAUSE)
|
if (Core::GetState() == Core::CORE_UNINITIALIZED || Core::GetState() == Core::CORE_PAUSE)
|
||||||
{
|
|
||||||
m_bHotkeysInit = InitControllers();
|
|
||||||
g_controller_interface.UpdateInput();
|
g_controller_interface.UpdateInput();
|
||||||
}
|
|
||||||
|
|
||||||
if (Core::GetState() != Core::CORE_STOPPING)
|
if (Core::GetState() != Core::CORE_STOPPING)
|
||||||
{
|
{
|
||||||
|
@ -176,7 +176,6 @@ private:
|
|||||||
bool m_bGameLoading;
|
bool m_bGameLoading;
|
||||||
bool m_bClosing;
|
bool m_bClosing;
|
||||||
bool m_confirmStop;
|
bool m_confirmStop;
|
||||||
bool m_bHotkeysInit;
|
|
||||||
|
|
||||||
std::vector<std::string> drives;
|
std::vector<std::string> drives;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user