mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Core/Host: Allow frontends to block inputs
This commit is contained in:
parent
0a3279ae6b
commit
61350b3d98
@ -94,6 +94,10 @@ void Host_NotifyMapLoaded()
|
||||
void Host_RefreshDSPDebuggerWindow()
|
||||
{
|
||||
}
|
||||
bool Host_UIBlocksControllerState()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void Host_Message(HostMessageID id)
|
||||
{
|
||||
|
@ -33,6 +33,7 @@ enum class HostMessageID
|
||||
};
|
||||
|
||||
bool Host_UINeedsControllerState();
|
||||
bool Host_UIBlocksControllerState();
|
||||
bool Host_RendererHasFocus();
|
||||
bool Host_RendererIsFullscreen();
|
||||
void Host_Message(HostMessageID id);
|
||||
|
@ -52,6 +52,11 @@ void Host_RefreshDSPDebuggerWindow()
|
||||
{
|
||||
}
|
||||
|
||||
bool Host_UIBlocksControllerState()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static Common::Event s_update_main_frame_event;
|
||||
void Host_Message(HostMessageID id)
|
||||
{
|
||||
|
@ -151,6 +151,12 @@ bool Host_UINeedsControllerState()
|
||||
{
|
||||
return Settings::Instance().IsControllerStateNeeded();
|
||||
}
|
||||
|
||||
bool Host_UIBlocksControllerState()
|
||||
{
|
||||
return ImGui::GetCurrentContext() && ImGui::GetIO().WantCaptureKeyboard;
|
||||
}
|
||||
|
||||
void Host_RefreshDSPDebuggerWindow()
|
||||
{
|
||||
}
|
||||
|
@ -14,8 +14,9 @@ using namespace ciface::ExpressionParser;
|
||||
|
||||
bool ControlReference::InputGateOn()
|
||||
{
|
||||
return SConfig::GetInstance().m_BackgroundInput || Host_RendererHasFocus() ||
|
||||
Host_UINeedsControllerState();
|
||||
return (SConfig::GetInstance().m_BackgroundInput || Host_RendererHasFocus() ||
|
||||
Host_UINeedsControllerState()) &&
|
||||
!Host_UIBlocksControllerState();
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -35,6 +35,10 @@ bool Host_UINeedsControllerState()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
bool Host_UIBlocksControllerState()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
bool Host_RendererHasFocus()
|
||||
{
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user