You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-16 14:00:40 +00:00
Merge pull request #13437 from xsellier/bugfix/mouse-cursor-lag
Implement hardware cursor acceleration for Godot Engine 2.1
This commit is contained in:
@@ -953,20 +953,6 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
|
||||
register_scene_types();
|
||||
register_server_types();
|
||||
|
||||
GLOBAL_DEF("display/custom_mouse_cursor", String());
|
||||
GLOBAL_DEF("display/custom_mouse_cursor_hotspot", Vector2());
|
||||
Globals::get_singleton()->set_custom_property_info("display/custom_mouse_cursor", PropertyInfo(Variant::STRING, "display/custom_mouse_cursor", PROPERTY_HINT_FILE, "*.png,*.webp"));
|
||||
|
||||
if (String(Globals::get_singleton()->get("display/custom_mouse_cursor")) != String()) {
|
||||
|
||||
//print_line("use custom cursor");
|
||||
Ref<Texture> cursor = ResourceLoader::load(Globals::get_singleton()->get("display/custom_mouse_cursor"));
|
||||
if (cursor.is_valid()) {
|
||||
// print_line("loaded ok");
|
||||
Vector2 hotspot = Globals::get_singleton()->get("display/custom_mouse_cursor_hotspot");
|
||||
Input::get_singleton()->set_custom_mouse_cursor(cursor, hotspot);
|
||||
}
|
||||
}
|
||||
#ifdef TOOLS_ENABLED
|
||||
EditorNode::register_editor_types();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user