1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-26 12:42:41 +01:00

Disable AA for renderers which do not support it

This commit is contained in:
MSuih 2020-01-04 17:39:16 +02:00 committed by Megamouse
parent 049f852a9c
commit 5534c9e27c
3 changed files with 13 additions and 5 deletions

View File

@ -186,7 +186,7 @@ emu_settings::Render_Creator::Render_Creator()
#endif
// Graphics Adapter
Vulkan = Render_Info(name_Vulkan, vulkanAdapters, supportsVulkan, emu_settings::VulkanAdapter);
Vulkan = Render_Info(name_Vulkan, vulkanAdapters, supportsVulkan, emu_settings::VulkanAdapter, true);
OpenGL = Render_Info(name_OpenGL);
NullRender = Render_Info(name_Null);

View File

@ -163,11 +163,12 @@ public:
SettingsType type = VulkanAdapter;
bool supported = true;
bool has_adapters = true;
bool has_msaa = false;
Render_Info() {}
Render_Info(const QString& name) : name(name), has_adapters(false) {}
Render_Info(const QString& name, const QStringList& adapters, bool supported, SettingsType type)
: name(name), adapters(adapters), supported(supported), type(type) {}
Render_Info() = default;
explicit Render_Info(QString name) : name(std::move(name)), has_adapters(false) {}
Render_Info(QString name, QStringList adapters, bool supported, SettingsType type, bool has_msaa)
: name(std::move(name)), adapters(std::move(adapters)), supported(supported), type(type), has_msaa(has_msaa) {}
};
struct Render_Creator

View File

@ -538,6 +538,13 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
xemu_settings->SetSetting(render->type, sstr(render->old_adapter));
}
}
// Enable/disable MSAA depending on renderer
ui->antiAliasing->setEnabled(renderer.has_msaa);
ui->antiAliasing->blockSignals(true);
ui->antiAliasing->setCurrentText(renderer.has_msaa ? qstr(xemu_settings->GetSetting(emu_settings::MSAA)) : tr("Disabled"));
ui->antiAliasing->blockSignals(false);
// Fill combobox with placeholder if no adapters needed
if (!renderer.has_adapters)
{