Fix Determining Window for Touchscreen
DisplayServer::screen_is_touchscreen will likely never utilize its parameter p_screen. This PR replaces this function by DisplayServer::is_touchscreen_available() with the same functionality. This solves the problem, that a SubViewport was used for determining the screen, which resulted in error messages.
This commit is contained in:
@ -164,8 +164,8 @@ void ScrollContainer::gui_input(const Ref<InputEvent> &p_gui_input) {
|
||||
}
|
||||
}
|
||||
|
||||
bool screen_is_touchscreen = DisplayServer::get_singleton()->screen_is_touchscreen(DisplayServer::get_singleton()->window_get_current_screen(get_viewport()->get_window_id()));
|
||||
if (!screen_is_touchscreen) {
|
||||
bool is_touchscreen_available = DisplayServer::get_singleton()->is_touchscreen_available();
|
||||
if (!is_touchscreen_available) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user