From 4be68dddfbdc7065139351e6e39b5fa97844264a Mon Sep 17 00:00:00 2001 From: LittleWhite Date: Thu, 7 Jan 2016 20:33:54 +0100 Subject: Improve error report from Init() functions Add error popup when citra initialization failed --- src/video_core/video_core.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/video_core/video_core.cpp') diff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cpp index 912db91a4..ee5e50df1 100644 --- a/src/video_core/video_core.cpp +++ b/src/video_core/video_core.cpp @@ -28,15 +28,19 @@ std::atomic g_hw_renderer_enabled; std::atomic g_shader_jit_enabled; /// Initialize the video core -void Init(EmuWindow* emu_window) { +bool Init(EmuWindow* emu_window) { Pica::Init(); g_emu_window = emu_window; g_renderer = Common::make_unique(); g_renderer->SetWindow(g_emu_window); - g_renderer->Init(); - - LOG_DEBUG(Render, "initialized OK"); + if (g_renderer->Init()) { + LOG_DEBUG(Render, "initialized OK"); + } else { + LOG_ERROR(Render, "initialization failed !"); + return false; + } + return true; } /// Shutdown the video core -- cgit v1.2.3