diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-07-19 18:58:15 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2018-07-19 19:02:04 -0300 |
commit | c69de2ba46463adeadf90f38660d6b6e034d7e0b (patch) | |
tree | ddeb1c8e40c080a6544eba86fc12f138b54be0ed /platform/x11 | |
parent | 76bfe14e00ee5c8b65275d8b8e0c4cdc25b4b899 (diff) |
-Project/Editor settings now use new inspector
-Project/Editor settings now show tooltips properly
-Settings thar require restart now will show a restart warning
-Video driver is now visible all the time, can be changed easily
-Added function to request current video driver
Diffstat (limited to 'platform/x11')
-rw-r--r-- | platform/x11/os_x11.cpp | 10 | ||||
-rw-r--r-- | platform/x11/os_x11.h | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 2adc8bfb50..af0e02173f 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -84,6 +84,10 @@ void OS_X11::initialize_core() { OS_Unix::initialize_core(); } +int OS_X11::get_current_video_driver() const { + return video_driver_index; +} + Error OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) { long im_event_mask = 0; @@ -285,6 +289,8 @@ Error OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_a } break; } + video_driver_index = p_video_driver; // FIXME TODO - FIX IF DRIVER DETECTION HAPPENS AND GLES2 MUST BE USED + context_gl->set_use_vsync(current_videomode.use_vsync); #endif @@ -1825,8 +1831,8 @@ void OS_X11::process_xevents() { GrabModeAsync, GrabModeAsync, x11_window, None, CurrentTime); } #ifdef TOUCH_ENABLED - // Grab touch devices to avoid OS gesture interference - /*for (int i = 0; i < touch.devices.size(); ++i) { + // Grab touch devices to avoid OS gesture interference + /*for (int i = 0; i < touch.devices.size(); ++i) { XIGrabDevice(x11_display, touch.devices[i], x11_window, CurrentTime, None, XIGrabModeAsync, XIGrabModeAsync, False, &touch.event_mask); }*/ #endif diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h index 8cab23fe63..4045a6e7ad 100644 --- a/platform/x11/os_x11.h +++ b/platform/x11/os_x11.h @@ -180,6 +180,7 @@ class OS_X11 : public OS_Unix { CrashHandler crash_handler; + int video_driver_index; int audio_driver_index; unsigned int capture_idle; bool maximized; @@ -206,6 +207,8 @@ protected: bool is_window_maximize_allowed(); public: + virtual int get_current_video_driver() const; + virtual String get_name(); virtual void set_cursor_shape(CursorShape p_shape); |