summaryrefslogtreecommitdiffstats
path: root/src/yuzu/bootmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuzu/bootmanager.cpp')
-rw-r--r--src/yuzu/bootmanager.cpp24
1 files changed, 19 insertions, 5 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index c934069dd..5b5b6fed8 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -118,7 +118,7 @@ void EmuThread::run() {
}
} else {
std::unique_lock lock{running_mutex};
- running_cv.wait(lock, stop_token, [this] { return IsRunning(); });
+ Common::CondvarWait(running_cv, lock, stop_token, [&] { return IsRunning(); });
}
}
@@ -237,8 +237,7 @@ private:
GRenderWindow* render_window;
};
-class OpenGLRenderWidget : public RenderWidget {
-public:
+struct OpenGLRenderWidget : public RenderWidget {
explicit OpenGLRenderWidget(GRenderWindow* parent) : RenderWidget(parent) {
windowHandle()->setSurfaceType(QWindow::OpenGLSurface);
}
@@ -251,13 +250,16 @@ private:
std::unique_ptr<Core::Frontend::GraphicsContext> context;
};
-class VulkanRenderWidget : public RenderWidget {
-public:
+struct VulkanRenderWidget : public RenderWidget {
explicit VulkanRenderWidget(GRenderWindow* parent) : RenderWidget(parent) {
windowHandle()->setSurfaceType(QWindow::VulkanSurface);
}
};
+struct NullRenderWidget : public RenderWidget {
+ explicit NullRenderWidget(GRenderWindow* parent) : RenderWidget(parent) {}
+};
+
static Core::Frontend::WindowSystemType GetWindowSystemType() {
// Determine WSI type based on Qt platform.
QString platform_name = QGuiApplication::platformName();
@@ -267,6 +269,10 @@ static Core::Frontend::WindowSystemType GetWindowSystemType() {
return Core::Frontend::WindowSystemType::X11;
else if (platform_name == QStringLiteral("wayland"))
return Core::Frontend::WindowSystemType::Wayland;
+ else if (platform_name == QStringLiteral("cocoa"))
+ return Core::Frontend::WindowSystemType::Cocoa;
+ else if (platform_name == QStringLiteral("android"))
+ return Core::Frontend::WindowSystemType::Android;
LOG_CRITICAL(Frontend, "Unknown Qt platform!");
return Core::Frontend::WindowSystemType::Windows;
@@ -874,6 +880,9 @@ bool GRenderWindow::InitRenderTarget() {
return false;
}
break;
+ case Settings::RendererBackend::Null:
+ InitializeNull();
+ break;
}
// Update the Window System information with the new render target
@@ -970,6 +979,11 @@ bool GRenderWindow::InitializeVulkan() {
return true;
}
+void GRenderWindow::InitializeNull() {
+ child_widget = new NullRenderWidget(this);
+ main_context = std::make_unique<DummyContext>();
+}
+
bool GRenderWindow::LoadOpenGL() {
auto context = CreateSharedContext();
auto scope = context->Acquire();