Skip to content
Permalink
Browse files

Core/Host: Allow frontends to block inputs

  • Loading branch information...
spycrab committed Mar 18, 2019
1 parent 0a3279a commit 61350b3d989d07c77f9b9e58d47c4263294158ee
@@ -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;

0 comments on commit 61350b3

Please sign in to comment.
You can’t perform that action at this time.