FullscreenUI: Re-enable most previously-missing settings

This commit is contained in:
Connor McLaughlin
2022-08-26 01:26:55 +10:00
parent cac2714555
commit cab51c6764
24 changed files with 1229 additions and 1244 deletions

File diff suppressed because it is too large Load Diff

View File

@ -733,6 +733,22 @@ ImFont* ImGuiManager::GetLargeFont()
return s_large_font;
}
bool ImGuiManager::WantsTextInput()
{
return s_imgui_wants_keyboard.load(std::memory_order_acquire);
}
void ImGuiManager::AddTextInput(std::string str)
{
if (!ImGui::GetCurrentContext())
return;
if (!s_imgui_wants_keyboard.load(std::memory_order_acquire))
return;
ImGui::GetIO().AddInputCharactersUTF8(str.c_str());
}
void ImGuiManager::UpdateMousePosition(float x, float y)
{
if (!ImGui::GetCurrentContext())

View File

@ -56,6 +56,12 @@ ImFont* GetMediumFont();
/// This font is allocated on demand.
ImFont* GetLargeFont();
/// Returns true if imgui wants to intercept text input.
bool WantsTextInput();
/// Called on the UI or CPU thread in response to a key press. String is UTF-8.
void AddTextInput(std::string str);
/// Called on the UI or CPU thread in response to mouse movement.
void UpdateMousePosition(float x, float y);

View File

@ -901,6 +901,7 @@ void InputManager::SetDefaultConfig(SettingsInterface& si)
si.ClearSection("InputSources");
si.SetBoolValue("InputSources", "SDL", true);
si.SetBoolValue("InputSources", "SDLControllerEnhancedMode", false);
si.SetBoolValue("InputSources", "Evdev", false);
si.SetBoolValue("InputSources", "XInput", false);
si.SetBoolValue("InputSources", "RawInput", false);
}