mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-18 15:40:05 +00:00
Merge pull request #3970 from FearlessTobi/more-popup-madness
citra_qt: Add more verbose popups for video_core errors
This commit is contained in:
commit
0a5621fafc
@ -626,10 +626,12 @@ bool GMainWindow::LoadROM(const QString& filename) {
|
||||
render_window->InitRenderTarget();
|
||||
render_window->MakeCurrent();
|
||||
|
||||
const char* below_gl33_title = "OpenGL 3.3 Unsupported";
|
||||
const char* below_gl33_message = "Your GPU may not support OpenGL 3.3, or you do not "
|
||||
"have the latest graphics driver.";
|
||||
|
||||
if (!gladLoadGL()) {
|
||||
QMessageBox::critical(this, tr("OpenGL 3.3 Unsupported"),
|
||||
tr("Your GPU may not support OpenGL 3.3, or you do not "
|
||||
"have the latest graphics driver."));
|
||||
QMessageBox::critical(this, tr(below_gl33_title), tr(below_gl33_message));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -689,7 +691,18 @@ 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("Video Core Error"),
|
||||
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(below_gl33_title), tr(below_gl33_message));
|
||||
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;
|
||||
@ -28,7 +29,7 @@ extern std::atomic<bool> g_hw_shader_accurate_mul;
|
||||
extern 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);
|
||||
|
||||
/// Shutdown the video core
|
||||
void Shutdown();
|
||||
|
Loading…
Reference in New Issue
Block a user