godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.3k stars 21.24k forks source link

display_server_wayland.cpp has unreachable code #99392

Open maddin200 opened 4 days ago

maddin200 commented 4 days ago

Tested versions

4.3 src Linux

System information

Linux

Issue description

File:

https://github.com/godotengine/godot/blob/fd4c29a189e53a1e085df5b9b9a05cac9351b3ef/platform/linuxbsd/wayland/display_server_wayland.cpp#L374-L382

Code:

Point2i DisplayServerWayland::mouse_get_position() const {
    MutexLock mutex_lock(wayland_thread.mutex);

    // We can't properly implement this method by design.
    // This is the best we can do unfortunately.
    return Input::get_singleton()->get_mouse_position();

    return Point2i(); // <- unreachable
}

Steps to reproduce

see above

Minimal reproduction project (MRP)

see above

Edit by the production team: added syntax highlighting and added the link to the file.

adamscott commented 3 days ago

@maddin200 This is less an issue than something you can directly commit to correct! Here's the PR workflow.

cc. @Riteo