From 0c538f28acc1043d0f94fabf3e290869d944ef69 Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Tue, 15 Sep 2026 20:49:33 -0700 Subject: [PATCH 1/2] fix: mark version scripts executable Non-executable version.sh made the Makefile fall back to vUnknown. --- scripts/gen_versioninfo.sh | 0 scripts/version.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 scripts/gen_versioninfo.sh mode change 100644 => 100755 scripts/version.sh diff --git a/scripts/gen_versioninfo.sh b/scripts/gen_versioninfo.sh old mode 100644 new mode 100755 diff --git a/scripts/version.sh b/scripts/version.sh old mode 100644 new mode 100755 From afcfe0eae22e26f41cc4076c04c31f40b440fe19 Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Tue, 15 Sep 2026 20:49:33 -0700 Subject: [PATCH 2/2] fix: orbit and pan the camera with left-drag Right-drag is unreachable on a trackpad. A press past a small threshold counts as a drag and its click is swallowed, so moving the view does not also select. --- src/main.cpp | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index d163fce..212c395 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -529,6 +529,9 @@ int main(void) Satellite *selected_sat = NULL; TargetLock active_lock = LOCK_EARTH; double last_left_click_time = 0.0; + Vector2 left_press_pos = {0}; + bool left_press_over_ui = false; + bool left_drag_active = false; /* apply vsync / fps limit at startup so the window state matches the config */ if (cfg.hint_vsync) @@ -887,6 +890,22 @@ int main(void) Vector2 mouseDelta = GetMouseDelta(); hovered_sat = NULL; + /* Classify the held left button as a click or a camera drag. Trackpads + * have no way to hold a right button while moving, so left-drag is the + * only workable pan/orbit gesture there; once a press passes the + * threshold the click is swallowed on release so dragging the view does + * not also select whatever sat happened to be under the cursor. */ + if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT)) + { + left_press_pos = GetMousePosition(); + left_press_over_ui = over_ui; + left_drag_active = false; + } + if (!left_press_over_ui && IsMouseButtonDown(MOUSE_BUTTON_LEFT) && + Vector2Distance(GetMousePosition(), left_press_pos) > 4.0f * cfg.ui_scale) + left_drag_active = true; + const bool left_dragging = left_drag_active && IsMouseButtonDown(MOUSE_BUTTON_LEFT); + /* vsync config check */ if (cfg.hint_vsync != IsWindowState(FLAG_VSYNC_HINT)) { @@ -909,7 +928,7 @@ int main(void) { if (!over_ui) { - if (IsMouseButtonDown(MOUSE_BUTTON_RIGHT) || (IsMouseButtonDown(MOUSE_BUTTON_MIDDLE) && IsKeyDown(KEY_LEFT_SHIFT))) + if (IsMouseButtonDown(MOUSE_BUTTON_RIGHT) || left_dragging || (IsMouseButtonDown(MOUSE_BUTTON_MIDDLE) && IsKeyDown(KEY_LEFT_SHIFT))) { target_camera2d_target = Vector2Add(target_camera2d_target, Vector2Scale(mouseDelta, -1.0f / target_camera2d_zoom)); active_lock = LOCK_NONE; @@ -967,7 +986,7 @@ int main(void) /* handle picking and camera in 3d mode */ if (!over_ui) { - if (IsMouseButtonDown(MOUSE_BUTTON_RIGHT)) + if (IsMouseButtonDown(MOUSE_BUTTON_RIGHT) || left_dragging) { if (IsKeyDown(KEY_LEFT_SHIFT)) { @@ -1079,8 +1098,9 @@ int main(void) } } - /* selection and double click for planet locking */ - if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT)) + /* selection and double click for planet locking; fires on release so a + * camera drag that started on a satellite does not count as a click */ + if (IsMouseButtonReleased(MOUSE_BUTTON_LEFT) && !left_drag_active) { if (!over_ui) {