mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 15:55:31 +01:00
Updated the hwnd for hotkeys.
This commit is contained in:
parent
39c41f5c70
commit
482ef964cf
@ -26,6 +26,7 @@
|
|||||||
#include "Core/CoreTiming.h"
|
#include "Core/CoreTiming.h"
|
||||||
#include "Core/DSPEmulator.h"
|
#include "Core/DSPEmulator.h"
|
||||||
#include "Core/Host.h"
|
#include "Core/Host.h"
|
||||||
|
#include "Core/HotkeyManager.h"
|
||||||
#include "Core/MemTools.h"
|
#include "Core/MemTools.h"
|
||||||
#include "Core/Movie.h"
|
#include "Core/Movie.h"
|
||||||
#include "Core/NetPlayProto.h"
|
#include "Core/NetPlayProto.h"
|
||||||
@ -96,6 +97,7 @@ static bool s_is_stopping = false;
|
|||||||
static bool s_hardware_initialized = false;
|
static bool s_hardware_initialized = false;
|
||||||
static bool s_is_started = false;
|
static bool s_is_started = false;
|
||||||
static void* s_window_handle = nullptr;
|
static void* s_window_handle = nullptr;
|
||||||
|
static bool s_window_handle_changed = false;
|
||||||
static std::string s_state_filename;
|
static std::string s_state_filename;
|
||||||
static std::thread s_emu_thread;
|
static std::thread s_emu_thread;
|
||||||
static StoppedCallbackFunc s_on_stopped_callback = nullptr;
|
static StoppedCallbackFunc s_on_stopped_callback = nullptr;
|
||||||
@ -228,7 +230,12 @@ bool Init()
|
|||||||
!!SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.AR"));
|
!!SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.AR"));
|
||||||
}
|
}
|
||||||
|
|
||||||
s_window_handle = Host_GetRenderHandle();
|
s_window_handle_changed = false;
|
||||||
|
if (s_window_handle != Host_GetRenderHandle())
|
||||||
|
{
|
||||||
|
s_window_handle = Host_GetRenderHandle();
|
||||||
|
s_window_handle_changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
// Start the emu thread
|
// Start the emu thread
|
||||||
s_emu_thread = std::thread(EmuThread);
|
s_emu_thread = std::thread(EmuThread);
|
||||||
@ -430,7 +437,11 @@ void EmuThread()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Update references in case controllers were refreshed
|
// Update references in case controllers were refreshed
|
||||||
g_controller_interface.Initialize(s_window_handle);
|
if (s_window_handle_changed)
|
||||||
|
{
|
||||||
|
g_controller_interface.Initialize(s_window_handle);
|
||||||
|
HotkeyManagerEmu::LoadConfig();
|
||||||
|
}
|
||||||
Pad::LoadConfig();
|
Pad::LoadConfig();
|
||||||
Keyboard::LoadConfig();
|
Keyboard::LoadConfig();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user