mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2024-11-14 13:27:41 -07:00
Cache supported renderers
This commit is contained in:
parent
61afc57ff2
commit
94a2bce37c
@ -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");
|
||||
|
@ -78,6 +78,8 @@ private:
|
||||
|
||||
Ui::VideoSettingsDialog* ui;
|
||||
EmuInstance* emuInstance;
|
||||
bool base_gl;
|
||||
bool compute_gl;
|
||||
|
||||
QButtonGroup* grp3DRenderer;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user