diff --git a/src/frontend/qt_sdl/VideoSettingsDialog.cpp b/src/frontend/qt_sdl/VideoSettingsDialog.cpp index 9252cc4d..aea733a1 100644 --- a/src/frontend/qt_sdl/VideoSettingsDialog.cpp +++ b/src/frontend/qt_sdl/VideoSettingsDialog.cpp @@ -43,12 +43,6 @@ void VideoSettingsDialog::setEnabled() int renderer = cfg.GetInt("3D.Renderer"); int ogldisplay = cfg.GetBool("Screen.UseGL"); - // We will need it to disable specific options where unsupported - int supportedRenderer = getsupportedRenderers(); - - bool base_gl = supportedRenderer > renderer3D_Software; - bool compute_gl = supportedRenderer == renderer3D_OpenGLCompute; - if (!compute_gl) { ui->rb3DCompute->setEnabled(false); @@ -124,6 +118,10 @@ VideoSettingsDialog::VideoSettingsDialog(QWidget* parent) : QDialog(parent), ui( setAttribute(Qt::WA_DeleteOnClose); emuInstance = ((MainWindow*)parent)->getEmuInstance(); + int supportedRenderers = getsupportedRenderers(); + + base_gl = supportedRenderers > renderer3D_Software; + compute_gl = supportedRenderers == renderer3D_OpenGLCompute; auto& cfg = emuInstance->getGlobalConfig(); oldRenderer = cfg.GetInt("3D.Renderer"); diff --git a/src/frontend/qt_sdl/VideoSettingsDialog.h b/src/frontend/qt_sdl/VideoSettingsDialog.h index dad58dd2..a47d0a55 100644 --- a/src/frontend/qt_sdl/VideoSettingsDialog.h +++ b/src/frontend/qt_sdl/VideoSettingsDialog.h @@ -78,6 +78,8 @@ private: Ui::VideoSettingsDialog* ui; EmuInstance* emuInstance; + bool base_gl; + bool compute_gl; QButtonGroup* grp3DRenderer;