diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/core.cpp | 4 | ||||
-rw-r--r-- | src/core/frontend/emu_window.h | 7 | ||||
-rw-r--r-- | src/core/settings.h | 9 | ||||
-rw-r--r-- | src/core/telemetry_session.cpp | 12 |
4 files changed, 30 insertions, 2 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index c53d122be..0eb0c0dca 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -268,7 +268,9 @@ struct System::Impl { is_powered_on = false; exit_lock = false; - gpu_core->WaitIdle(); + if (gpu_core) { + gpu_core->WaitIdle(); + } // Shutdown emulation session renderer.reset(); diff --git a/src/core/frontend/emu_window.h b/src/core/frontend/emu_window.h index 4a9912641..3376eedc5 100644 --- a/src/core/frontend/emu_window.h +++ b/src/core/frontend/emu_window.h @@ -75,6 +75,13 @@ public: return nullptr; } + /// Returns if window is shown (not minimized) + virtual bool IsShown() const = 0; + + /// Retrieves Vulkan specific handlers from the window + virtual void RetrieveVulkanHandlers(void* get_instance_proc_addr, void* instance, + void* surface) const = 0; + /** * Signal that a touch pressed event has occurred (e.g. mouse click pressed) * @param framebuffer_x Framebuffer x-coordinate that was pressed diff --git a/src/core/settings.h b/src/core/settings.h index 421e76f5f..e1a9a0ffa 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -371,6 +371,11 @@ enum class SDMCSize : u64 { S1TB = 0x10000000000ULL, }; +enum class RendererBackend { + OpenGL = 0, + Vulkan = 1, +}; + struct Values { // System bool use_docked_mode; @@ -419,6 +424,10 @@ struct Values { SDMCSize sdmc_size; // Renderer + RendererBackend renderer_backend; + bool renderer_debug; + int vulkan_device; + float resolution_factor; bool use_frame_limit; u16 frame_limit; diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index 320e8ad73..0e72d31cd 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp @@ -46,6 +46,16 @@ static u64 GenerateTelemetryId() { return telemetry_id; } +static const char* TranslateRenderer(Settings::RendererBackend backend) { + switch (backend) { + case Settings::RendererBackend::OpenGL: + return "OpenGL"; + case Settings::RendererBackend::Vulkan: + return "Vulkan"; + } + return "Unknown"; +} + u64 GetTelemetryId() { u64 telemetry_id{}; const std::string filename{FileUtil::GetUserPath(FileUtil::UserPath::ConfigDir) + @@ -169,7 +179,7 @@ void TelemetrySession::AddInitialInfo(Loader::AppLoader& app_loader) { AddField(field_type, "Audio_SinkId", Settings::values.sink_id); AddField(field_type, "Audio_EnableAudioStretching", Settings::values.enable_audio_stretching); AddField(field_type, "Core_UseMultiCore", Settings::values.use_multi_core); - AddField(field_type, "Renderer_Backend", "OpenGL"); + AddField(field_type, "Renderer_Backend", TranslateRenderer(Settings::values.renderer_backend)); AddField(field_type, "Renderer_ResolutionFactor", Settings::values.resolution_factor); AddField(field_type, "Renderer_UseFrameLimit", Settings::values.use_frame_limit); AddField(field_type, "Renderer_FrameLimit", Settings::values.frame_limit); |