@@ -333,7 +333,7 @@ end)(jit.status()))
333333
334334 setFullscreen (m_fullscreen);
335335 const auto currentTheme =
336- g_emulator-> settings .get <Emulator::SettingGUITheme>().value ; // On boot: reload GUI theme
336+ emuSettings .get <Emulator::SettingGUITheme>().value ; // On boot: reload GUI theme
337337 applyTheme (currentTheme);
338338
339339 if (emuSettings.get <Emulator::SettingMcd1>().empty ()) {
@@ -397,8 +397,10 @@ end)(jit.status()))
397397 glfwSetKeyCallback (m_window, glfwKeyCallbackTrampoline);
398398 glfwSetJoystickCallback ([](int jid, int event) { PCSX ::g_emulator->m_pads ->scanGamepads (); });
399399 ImGui_ImplOpenGL3_Init (GL_SHADER_VERSION );
400- glEnable (GL_DEBUG_OUTPUT );
401- if (glDebugMessageCallback) {
400+
401+ if (glDebugMessageCallback && g_emulator->settings .get <Emulator::SettingGLErrorReporting>()) {
402+ m_reportGLErrors = true ;
403+ glEnable (GL_DEBUG_OUTPUT );
402404 glDebugMessageCallback (
403405 [](GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message,
404406 GLvoid* userParam) {
@@ -1064,7 +1066,7 @@ void PCSX::GUI::endFrame() {
10641066 m_breakpoints.draw (_ (" Breakpoints" ));
10651067 }
10661068
1067- about ();
1069+ changed |= about ();
10681070 interruptsScaler ();
10691071
10701072 if (m_dwarf.m_show ) {
@@ -1508,8 +1510,10 @@ bool PCSX::GUI::showThemes() {
15081510 return changed;
15091511}
15101512
1511- void PCSX::GUI::about () {
1512- if (!m_showAbout) return ;
1513+ bool PCSX::GUI::about () {
1514+ if (!m_showAbout) return false ;
1515+ bool changed = false ;
1516+
15131517 ImGui::SetNextWindowPos (ImVec2 (200 , 100 ), ImGuiCond_FirstUseEver);
15141518 ImGui::SetNextWindowSize (ImVec2 (880 , 600 ), ImGuiCond_FirstUseEver);
15151519 if (ImGui::Begin (_ (" About" ), &m_showAbout)) {
@@ -1529,16 +1533,28 @@ void PCSX::GUI::about() {
15291533 ImGui::EndTabItem ();
15301534 }
15311535 if (ImGui::BeginTabItem (_ (" OpenGL information" ))) {
1532- if (glDebugMessageCallback ) {
1536+ if (m_reportGLErrors ) {
15331537 ImGui::TextUnformatted (_ (" OpenGL error reporting: enabled" ));
15341538 } else {
15351539 ImGui::TextUnformatted (_ (" OpenGL error reporting: disabled" ));
1536- ShowHelpMarker (
1537- _ (" OpenGL error reporting has been disabled because your OpenGL driver is too old. Error "
1538- " reporting requires at least OpenGL 4.3. Please update your graphics drivers, or contact "
1539- " your GPU vendor for correct OpenGL drivers. Disabled OpenGL error reporting won't have a "
1540- " negative impact on the performances of this software, but user code such as the shader "
1541- " editor won't be able to properly report problems accurately." ));
1540+ if (!glDebugMessageCallback) {
1541+ ShowHelpMarker (_ (
1542+ " OpenGL error reporting has been disabled because your OpenGL driver is too old. Error "
1543+ " reporting requires at least OpenGL 4.3. Please update your graphics drivers, or contact "
1544+ " your GPU vendor for correct OpenGL drivers. Disabled OpenGL error reporting won't have a "
1545+ " negative impact on the performances of this software, but user code such as the shader "
1546+ " editor won't be able to properly report problems accurately." ));
1547+ }
1548+ }
1549+
1550+ if (glDebugMessageCallback) {
1551+ changed |= ImGui::Checkbox (_ (" Enable OpenGL error reporting" ),
1552+ &g_emulator->settings .get <Emulator::SettingGLErrorReporting>().value );
1553+
1554+ ShowHelpMarker (_ (
1555+ " OpenGL error reporting is necessary for properly reporting OpenGL problems. "
1556+ " However it requires OpenGL 4.3+ and might have performance repercussions on "
1557+ " some PCs. (Requires reboot)" ));
15421558 }
15431559 ImGui::Text (_ (" Core profile: %s" ), m_hasCoreProfile ? " yes" : " no" );
15441560 someString (_ (" Vendor" ), GL_VENDOR );
@@ -1560,6 +1576,7 @@ void PCSX::GUI::about() {
15601576 }
15611577 }
15621578 ImGui::End ();
1579+ return changed;
15631580}
15641581
15651582void PCSX::GUI::update (bool vsync) {
0 commit comments