diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-07 13:24:06 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-07 13:24:06 +0100 |
commit | eb1734c95d56c2017f5a215c56d56abefcedb4d9 (patch) | |
tree | 33a8b3e6e3cdb471e786418b6d9a68d3732e57da /servers/display_server.cpp | |
parent | 04cd36612ae017a4daf9670a89eb2fafb54e2a8b (diff) | |
parent | e18107a57ccaf3d93a8893fe36f6d9010e2cdef1 (diff) |
Merge pull request #67554 from Sauermann/fix-determining-window-in-scroll-container
Remove Screen-parameter for determining Touchscreen capability
Diffstat (limited to 'servers/display_server.cpp')
-rw-r--r-- | servers/display_server.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/servers/display_server.cpp b/servers/display_server.cpp index 52d7f66203..897c685f25 100644 --- a/servers/display_server.cpp +++ b/servers/display_server.cpp @@ -367,8 +367,7 @@ float DisplayServer::screen_get_scale(int p_screen) const { return 1.0f; }; -bool DisplayServer::screen_is_touchscreen(int p_screen) const { - //return false; +bool DisplayServer::is_touchscreen_available() const { return Input::get_singleton() && Input::get_singleton()->is_emulating_touch_from_mouse(); } @@ -618,7 +617,7 @@ void DisplayServer::_bind_methods() { ClassDB::bind_method(D_METHOD("screen_get_usable_rect", "screen"), &DisplayServer::screen_get_usable_rect, DEFVAL(SCREEN_OF_MAIN_WINDOW)); ClassDB::bind_method(D_METHOD("screen_get_dpi", "screen"), &DisplayServer::screen_get_dpi, DEFVAL(SCREEN_OF_MAIN_WINDOW)); ClassDB::bind_method(D_METHOD("screen_get_scale", "screen"), &DisplayServer::screen_get_scale, DEFVAL(SCREEN_OF_MAIN_WINDOW)); - ClassDB::bind_method(D_METHOD("screen_is_touchscreen", "screen"), &DisplayServer::screen_is_touchscreen, DEFVAL(SCREEN_OF_MAIN_WINDOW)); + ClassDB::bind_method(D_METHOD("is_touchscreen_available"), &DisplayServer::is_touchscreen_available, DEFVAL(SCREEN_OF_MAIN_WINDOW)); ClassDB::bind_method(D_METHOD("screen_get_max_scale"), &DisplayServer::screen_get_max_scale); ClassDB::bind_method(D_METHOD("screen_get_refresh_rate", "screen"), &DisplayServer::screen_get_refresh_rate, DEFVAL(SCREEN_OF_MAIN_WINDOW)); |