mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 20:58:54 +00:00
Qt: Implement GBA host and widget
This commit is contained in:
parent
9b80fb7deb
commit
d6f86e1754
8 changed files with 635 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue