Merge pull request #6745 from spycrab/qt_fullscreen
Qt: Call Render::SetFullscreen
This commit is contained in:
commit
be32602769
|
@ -16,6 +16,7 @@
|
|||
#include "Core/PowerPC/PowerPC.h"
|
||||
#include "DolphinQt2/Settings.h"
|
||||
#include "VideoCommon/RenderBase.h"
|
||||
#include "VideoCommon/VideoConfig.h"
|
||||
|
||||
Host::Host() = default;
|
||||
|
||||
|
@ -43,6 +44,8 @@ bool Host::GetRenderFocus()
|
|||
void Host::SetRenderFocus(bool focus)
|
||||
{
|
||||
m_render_focus = focus;
|
||||
if (g_renderer && m_render_fullscreen && g_ActiveConfig.ExclusiveFullscreenEnabled())
|
||||
Core::RunAsCPUThread([focus] { g_renderer->SetFullscreen(focus); });
|
||||
}
|
||||
|
||||
bool Host::GetRenderFullscreen()
|
||||
|
@ -53,6 +56,10 @@ bool Host::GetRenderFullscreen()
|
|||
void Host::SetRenderFullscreen(bool fullscreen)
|
||||
{
|
||||
m_render_fullscreen = fullscreen;
|
||||
|
||||
if (g_renderer && g_renderer->IsFullscreen() != fullscreen &&
|
||||
g_ActiveConfig.ExclusiveFullscreenEnabled())
|
||||
Core::RunAsCPUThread([fullscreen] { g_renderer->SetFullscreen(fullscreen); });
|
||||
}
|
||||
|
||||
void Host::ResizeSurface(int new_width, int new_height)
|
||||
|
|
|
@ -37,7 +37,7 @@ signals:
|
|||
private:
|
||||
Host();
|
||||
|
||||
std::atomic<void*> m_render_handle;
|
||||
std::atomic<bool> m_render_focus;
|
||||
std::atomic<bool> m_render_fullscreen;
|
||||
std::atomic<void*> m_render_handle{nullptr};
|
||||
std::atomic<bool> m_render_focus{false};
|
||||
std::atomic<bool> m_render_fullscreen{false};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue