summaryrefslogtreecommitdiff
path: root/platform/x11/os_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/x11/os_x11.cpp')
-rw-r--r--platform/x11/os_x11.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 76fc51d52c..0cdd0f338b 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -78,19 +78,23 @@
#include <X11/XKBlib.h>
int OS_X11::get_video_driver_count() const {
- return 1;
+
+ return 2;
}
const char *OS_X11::get_video_driver_name(int p_driver) const {
- String driver_name = GLOBAL_GET("rendering/quality/driver/driver_name");
- if (driver_name == "GLES2") {
- return "GLES2";
+ switch (p_driver) {
+ case VIDEO_DRIVER_GLES2:
+ return "GLES2";
+ case VIDEO_DRIVER_GLES3:
+ default:
+ return "GLES3";
}
- return "GLES3";
}
int OS_X11::get_audio_driver_count() const {
+
return AudioDriverManager::get_driver_count();
}
@@ -289,13 +293,9 @@ Error OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
//print_line("def videomode "+itos(current_videomode.width)+","+itos(current_videomode.height));
#if defined(OPENGL_ENABLED)
- String setting_name = "rendering/quality/driver/driver_name";
- ProjectSettings::get_singleton()->set_custom_property_info(setting_name, PropertyInfo(Variant::STRING, setting_name, PROPERTY_HINT_ENUM, "GLES3,GLES2"));
- String video_driver_name = GLOBAL_DEF("rendering/quality/driver/driver_name", "GLES3");
-
ContextGL_X11::ContextType opengl_api_type = ContextGL_X11::GLES_3_0_COMPATIBLE;
- if (video_driver_name == "GLES2") {
+ if (p_video_driver == VIDEO_DRIVER_GLES2) {
opengl_api_type = ContextGL_X11::GLES_2_0_COMPATIBLE;
}