mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-27 08:05:41 +00:00
Qt: Fix controller navigation for fullscreen UI
This commit is contained in:
parent
d6b8a80eb7
commit
b4e4e5891d
|
@ -194,22 +194,12 @@ void NoGUIHostInterface::RequestExit()
|
||||||
m_quit_request = true;
|
m_quit_request = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoGUIHostInterface::PollAndUpdate()
|
|
||||||
{
|
|
||||||
CommonHostInterface::PollAndUpdate();
|
|
||||||
|
|
||||||
if (m_controller_interface)
|
|
||||||
m_controller_interface->PollEvents();
|
|
||||||
}
|
|
||||||
|
|
||||||
void NoGUIHostInterface::Run()
|
void NoGUIHostInterface::Run()
|
||||||
{
|
{
|
||||||
while (!m_quit_request)
|
while (!m_quit_request)
|
||||||
{
|
{
|
||||||
RunCallbacks();
|
RunCallbacks();
|
||||||
PollAndUpdate();
|
PollAndUpdate();
|
||||||
if (m_fullscreen_ui_enabled)
|
|
||||||
FullscreenUI::SetImGuiNavInputs();
|
|
||||||
|
|
||||||
ImGui::NewFrame();
|
ImGui::NewFrame();
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,6 @@ protected:
|
||||||
void ReleaseHostDisplay() override;
|
void ReleaseHostDisplay() override;
|
||||||
|
|
||||||
void RequestExit() override;
|
void RequestExit() override;
|
||||||
virtual void PollAndUpdate() override;
|
|
||||||
|
|
||||||
virtual bool CreatePlatformWindow(bool fullscreen) = 0;
|
virtual bool CreatePlatformWindow(bool fullscreen) = 0;
|
||||||
virtual void DestroyPlatformWindow() = 0;
|
virtual void DestroyPlatformWindow() = 0;
|
||||||
|
|
|
@ -651,14 +651,6 @@ void* QtHostInterface::GetTopLevelWindowHandle() const
|
||||||
return reinterpret_cast<void*>(m_main_window->winId());
|
return reinterpret_cast<void*>(m_main_window->winId());
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtHostInterface::PollAndUpdate()
|
|
||||||
{
|
|
||||||
CommonHostInterface::PollAndUpdate();
|
|
||||||
|
|
||||||
if (m_controller_interface)
|
|
||||||
m_controller_interface->PollEvents();
|
|
||||||
}
|
|
||||||
|
|
||||||
void QtHostInterface::RequestExit()
|
void QtHostInterface::RequestExit()
|
||||||
{
|
{
|
||||||
emit exitRequested();
|
emit exitRequested();
|
||||||
|
|
|
@ -192,7 +192,6 @@ protected:
|
||||||
void ReleaseHostDisplay() override;
|
void ReleaseHostDisplay() override;
|
||||||
bool IsFullscreen() const override;
|
bool IsFullscreen() const override;
|
||||||
bool SetFullscreen(bool enabled) override;
|
bool SetFullscreen(bool enabled) override;
|
||||||
void PollAndUpdate() override;
|
|
||||||
|
|
||||||
void RequestExit() override;
|
void RequestExit() override;
|
||||||
std::optional<HostKeyCode> GetHostKeyCode(const std::string_view key_code) const override;
|
std::optional<HostKeyCode> GetHostKeyCode(const std::string_view key_code) const override;
|
||||||
|
|
|
@ -470,6 +470,12 @@ void CommonHostInterface::OnAchievementsRefreshed()
|
||||||
|
|
||||||
void CommonHostInterface::PollAndUpdate()
|
void CommonHostInterface::PollAndUpdate()
|
||||||
{
|
{
|
||||||
|
if (m_controller_interface)
|
||||||
|
m_controller_interface->PollEvents();
|
||||||
|
|
||||||
|
if (m_fullscreen_ui_enabled)
|
||||||
|
FullscreenUI::SetImGuiNavInputs();
|
||||||
|
|
||||||
#ifdef WITH_DISCORD_PRESENCE
|
#ifdef WITH_DISCORD_PRESENCE
|
||||||
PollDiscordPresence();
|
PollDiscordPresence();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue