citra-emu
/
citra
Archived
1
0
Fork 0

Add range check for renderer config (#6560)

This commit is contained in:
PabloMK7 2023-05-22 04:01:26 +02:00 committed by GitHub
parent 5c45c97ff9
commit 2281bf5b0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -17,6 +17,7 @@
namespace Settings {
constexpr u32 GraphicsAPICount = 2;
enum class GraphicsAPI {
Software = 0,
OpenGL = 1,
@ -425,7 +426,9 @@ struct Values {
Setting<bool> allow_plugin_loader{true, "allow_plugin_loader"};
// Renderer
SwitchableSetting<GraphicsAPI> graphics_api{GraphicsAPI::OpenGL, "graphics_api"};
SwitchableSetting<GraphicsAPI, true> graphics_api{
GraphicsAPI::OpenGL, GraphicsAPI::Software, static_cast<GraphicsAPI>(GraphicsAPICount - 1),
"graphics_api"};
Setting<bool> use_gles{false, "use_gles"};
Setting<bool> renderer_debug{false, "renderer_debug"};
SwitchableSetting<bool> use_hw_shader{true, "use_hw_shader"};