mirror of
https://github.com/citra-emu/citra-nightly.git
synced 2024-12-24 19:15:31 +00:00
Add more verbose popups for video_core errors
This commit is contained in:
parent
96c025e4c2
commit
d1c5f01afe
|
@ -681,7 +681,19 @@ bool GMainWindow::LoadROM(const QString& filename) {
|
|||
"the "
|
||||
"log</a> for more details. "
|
||||
"Ensure that you have the latest graphics drivers for your GPU."));
|
||||
break;
|
||||
|
||||
case Core::System::ResultStatus::ErrorVideoCore_ErrorGenericDrivers:
|
||||
QMessageBox::critical(
|
||||
this, tr("An error occured in the video core."),
|
||||
tr("You are running default Windows drivers for your GPU. You need to install the "
|
||||
"proper drivers for your graphics card from the manufacturer's website."));
|
||||
break;
|
||||
|
||||
case Core::System::ResultStatus::ErrorVideoCore_ErrorBelowGL33:
|
||||
QMessageBox::critical(this, tr("Error while initializing OpenGL 3.3 Core!"),
|
||||
tr("Your GPU may not support OpenGL 3.3, or you do not "
|
||||
"have the latest graphics driver."));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -178,8 +178,9 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) {
|
|||
GDBStub::Init();
|
||||
Movie::GetInstance().Init();
|
||||
|
||||
if (!VideoCore::Init(emu_window)) {
|
||||
return ResultStatus::ErrorVideoCore;
|
||||
ResultStatus result = VideoCore::Init(emu_window);
|
||||
if (result != ResultStatus::Success) {
|
||||
return result;
|
||||
}
|
||||
|
||||
LOG_DEBUG(Core, "Initialized OK");
|
||||
|
|
|
@ -46,12 +46,16 @@ public:
|
|||
ErrorSystemMode, ///< Error determining the system mode
|
||||
ErrorLoader, ///< Error loading the specified application
|
||||
ErrorLoader_ErrorEncrypted, ///< Error loading the specified application due to encryption
|
||||
ErrorLoader_ErrorInvalidFormat, ///< Error loading the specified application due to an
|
||||
/// invalid format
|
||||
ErrorSystemFiles, ///< Error in finding system files
|
||||
ErrorSharedFont, ///< Error in finding shared font
|
||||
ErrorVideoCore, ///< Error in the video core
|
||||
ErrorUnknown ///< Any other error
|
||||
ErrorLoader_ErrorInvalidFormat, ///< Error loading the specified application due to an
|
||||
/// invalid format
|
||||
ErrorSystemFiles, ///< Error in finding system files
|
||||
ErrorSharedFont, ///< Error in finding shared font
|
||||
ErrorVideoCore, ///< Error in the video core
|
||||
ErrorVideoCore_ErrorGenericDrivers, ///< Error in the video core due to the user having
|
||||
/// generic drivers installed
|
||||
ErrorVideoCore_ErrorBelowGL33, ///< Error in the video core due to the user not having
|
||||
/// OpenGL 3.3 or higher
|
||||
ErrorUnknown ///< Any other error
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <memory>
|
||||
#include "common/common_types.h"
|
||||
#include "core/core.h"
|
||||
#include "video_core/rasterizer_interface.h"
|
||||
|
||||
class EmuWindow;
|
||||
|
@ -27,7 +28,7 @@ public:
|
|||
virtual void SetWindow(EmuWindow* window) = 0;
|
||||
|
||||
/// Initialize the renderer
|
||||
virtual bool Init() = 0;
|
||||
virtual Core::System::ResultStatus Init() = 0;
|
||||
|
||||
/// Shutdown the renderer
|
||||
virtual void ShutDown() = 0;
|
||||
|
|
|
@ -505,7 +505,7 @@ static void APIENTRY DebugHandler(GLenum source, GLenum type, GLuint id, GLenum
|
|||
}
|
||||
|
||||
/// Initialize the renderer
|
||||
bool RendererOpenGL::Init() {
|
||||
Core::System::ResultStatus RendererOpenGL::Init() {
|
||||
render_window->MakeCurrent();
|
||||
|
||||
if (GLAD_GL_KHR_debug) {
|
||||
|
@ -525,15 +525,19 @@ bool RendererOpenGL::Init() {
|
|||
Core::Telemetry().AddField(Telemetry::FieldType::UserSystem, "GPU_Model", gpu_model);
|
||||
Core::Telemetry().AddField(Telemetry::FieldType::UserSystem, "GPU_OpenGL_Version", gl_version);
|
||||
|
||||
if (gpu_vendor == "GDI Generic") {
|
||||
return Core::System::ResultStatus::ErrorVideoCore_ErrorGenericDrivers;
|
||||
}
|
||||
|
||||
if (!GLAD_GL_VERSION_3_3) {
|
||||
return false;
|
||||
return Core::System::ResultStatus::ErrorVideoCore_ErrorBelowGL33;
|
||||
}
|
||||
|
||||
InitOpenGLObjects();
|
||||
|
||||
RefreshRasterizerSetting();
|
||||
|
||||
return true;
|
||||
return Core::System::ResultStatus::Success;
|
||||
}
|
||||
|
||||
/// Shutdown the renderer
|
||||
|
|
|
@ -47,7 +47,7 @@ public:
|
|||
void SetWindow(EmuWindow* window) override;
|
||||
|
||||
/// Initialize the renderer
|
||||
bool Init() override;
|
||||
Core::System::ResultStatus Init() override;
|
||||
|
||||
/// Shutdown the renderer
|
||||
void ShutDown() override;
|
||||
|
|
|
@ -25,19 +25,21 @@ std::atomic<bool> g_hw_shader_accurate_mul;
|
|||
std::atomic<bool> g_renderer_bg_color_update_requested;
|
||||
|
||||
/// Initialize the video core
|
||||
bool Init(EmuWindow* emu_window) {
|
||||
Core::System::ResultStatus Init(EmuWindow* emu_window) {
|
||||
Pica::Init();
|
||||
|
||||
g_emu_window = emu_window;
|
||||
g_renderer = std::make_unique<RendererOpenGL>();
|
||||
g_renderer->SetWindow(g_emu_window);
|
||||
if (g_renderer->Init()) {
|
||||
LOG_DEBUG(Render, "initialized OK");
|
||||
} else {
|
||||
Core::System::ResultStatus result = g_renderer->Init();
|
||||
|
||||
if (result != Core::System::ResultStatus::Success) {
|
||||
LOG_ERROR(Render, "initialization failed !");
|
||||
return false;
|
||||
} else {
|
||||
LOG_DEBUG(Render, "initialized OK");
|
||||
}
|
||||
return true;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// Shutdown the video core
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
#include "core/core.h"
|
||||
|
||||
class EmuWindow;
|
||||
class RendererBase;
|
||||
|
@ -31,7 +32,7 @@ extern std::atomic<bool> g_renderer_bg_color_update_requested;
|
|||
void Start();
|
||||
|
||||
/// Initialize the video core
|
||||
bool Init(EmuWindow* emu_window);
|
||||
Core::System::ResultStatus Init(EmuWindow* emu_window);
|
||||
|
||||
/// Shutdown the video core
|
||||
void Shutdown();
|
||||
|
|
Loading…
Reference in a new issue