mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-27 01:22:37 -06:00
Add range check for renderer config (#6560)
This commit is contained in:
parent
5c45c97ff9
commit
2281bf5b0b
1 changed files with 4 additions and 1 deletions
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
namespace Settings {
|
namespace Settings {
|
||||||
|
|
||||||
|
constexpr u32 GraphicsAPICount = 2;
|
||||||
enum class GraphicsAPI {
|
enum class GraphicsAPI {
|
||||||
Software = 0,
|
Software = 0,
|
||||||
OpenGL = 1,
|
OpenGL = 1,
|
||||||
|
@ -425,7 +426,9 @@ struct Values {
|
||||||
Setting<bool> allow_plugin_loader{true, "allow_plugin_loader"};
|
Setting<bool> allow_plugin_loader{true, "allow_plugin_loader"};
|
||||||
|
|
||||||
// Renderer
|
// 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> use_gles{false, "use_gles"};
|
||||||
Setting<bool> renderer_debug{false, "renderer_debug"};
|
Setting<bool> renderer_debug{false, "renderer_debug"};
|
||||||
SwitchableSetting<bool> use_hw_shader{true, "use_hw_shader"};
|
SwitchableSetting<bool> use_hw_shader{true, "use_hw_shader"};
|
||||||
|
|
Loading…
Reference in a new issue