Merge pull request #19718 from thduynguyen/bug_fixes
bugfix: correct #ifdef for TOUCH_ENABLED and OPENGL_ENABLED
This commit is contained in:
commit
74bd1bf1c2
|
@ -1954,6 +1954,7 @@ void OS_X11::process_xevents() {
|
||||||
// to be able to send relative motion events.
|
// to be able to send relative motion events.
|
||||||
Point2i pos(event.xmotion.x, event.xmotion.y);
|
Point2i pos(event.xmotion.x, event.xmotion.y);
|
||||||
|
|
||||||
|
#ifdef TOUCH_ENABLED
|
||||||
// Avoidance of spurious mouse motion (see handling of touch)
|
// Avoidance of spurious mouse motion (see handling of touch)
|
||||||
bool filter = false;
|
bool filter = false;
|
||||||
// Adding some tolerance to match better Point2i to Vector2
|
// Adding some tolerance to match better Point2i to Vector2
|
||||||
|
@ -1965,6 +1966,7 @@ void OS_X11::process_xevents() {
|
||||||
if (filter) {
|
if (filter) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (mouse_mode == MOUSE_MODE_CAPTURED) {
|
if (mouse_mode == MOUSE_MODE_CAPTURED) {
|
||||||
|
|
||||||
|
@ -2527,17 +2529,23 @@ void OS_X11::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, c
|
||||||
|
|
||||||
void OS_X11::release_rendering_thread() {
|
void OS_X11::release_rendering_thread() {
|
||||||
|
|
||||||
|
#if defined(OPENGL_ENABLED)
|
||||||
context_gl->release_current();
|
context_gl->release_current();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void OS_X11::make_rendering_thread() {
|
void OS_X11::make_rendering_thread() {
|
||||||
|
|
||||||
|
#if defined(OPENGL_ENABLED)
|
||||||
context_gl->make_current();
|
context_gl->make_current();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void OS_X11::swap_buffers() {
|
void OS_X11::swap_buffers() {
|
||||||
|
|
||||||
|
#if defined(OPENGL_ENABLED)
|
||||||
context_gl->swap_buffers();
|
context_gl->swap_buffers();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void OS_X11::alert(const String &p_alert, const String &p_title) {
|
void OS_X11::alert(const String &p_alert, const String &p_title) {
|
||||||
|
@ -2631,8 +2639,10 @@ String OS_X11::get_joy_guid(int p_device) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void OS_X11::_set_use_vsync(bool p_enable) {
|
void OS_X11::_set_use_vsync(bool p_enable) {
|
||||||
|
#if defined(OPENGL_ENABLED)
|
||||||
if (context_gl)
|
if (context_gl)
|
||||||
return context_gl->set_use_vsync(p_enable);
|
context_gl->set_use_vsync(p_enable);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
bool OS_X11::is_vsync_enabled() const {
|
bool OS_X11::is_vsync_enabled() const {
|
||||||
|
|
Loading…
Reference in New Issue