mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Qt: Implement GBA host and widget
This commit is contained in:
@ -24,6 +24,9 @@
|
||||
#include "Core/PowerPC/PowerPC.h"
|
||||
#include "Core/State.h"
|
||||
|
||||
#ifdef HAS_LIBMGBA
|
||||
#include "DolphinQt/GBAWidget.h"
|
||||
#endif
|
||||
#include "DolphinQt/QtUtils/QueueOnObject.h"
|
||||
#include "DolphinQt/Settings.h"
|
||||
|
||||
@ -115,6 +118,15 @@ void Host::SetRenderFullFocus(bool focus)
|
||||
m_render_full_focus = focus;
|
||||
}
|
||||
|
||||
bool Host::GetGBAFocus()
|
||||
{
|
||||
#ifdef HAS_LIBMGBA
|
||||
return qobject_cast<GBAWidget*>(QApplication::activeWindow()) != nullptr;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool Host::GetRenderFullscreen()
|
||||
{
|
||||
return m_render_fullscreen;
|
||||
@ -167,7 +179,7 @@ void Host_UpdateTitle(const std::string& title)
|
||||
|
||||
bool Host_RendererHasFocus()
|
||||
{
|
||||
return Host::GetInstance()->GetRenderFocus();
|
||||
return Host::GetInstance()->GetRenderFocus() || Host::GetInstance()->GetGBAFocus();
|
||||
}
|
||||
|
||||
bool Host_RendererHasFullFocus()
|
||||
@ -230,7 +242,9 @@ void Host_TitleChanged()
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef HAS_LIBMGBA
|
||||
std::unique_ptr<GBAHostInterface> Host_CreateGBAHost(std::weak_ptr<HW::GBA::Core> core)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user