Android fixes

This commit is contained in:
luboslenco
2025-08-20 18:25:57 +02:00
parent 9c87ab842c
commit 85798edd6d
2 changed files with 16 additions and 4 deletions
+14 -2
View File
@@ -23,6 +23,8 @@ static ui_t *ui_copy_receiver = NULL;
static int ui_copy_frame = 0;
static bool ui_combo_first = true;
static ui_handle_t *ui_combo_search_handle = NULL;
static int touch_hold_x = -1;
static int touch_hold_y = -1;
bool ui_touch_scroll = false; // Pan with finger to scroll
bool ui_touch_hold = false; // Touch and hold finger for right click
bool ui_touch_tooltip = false; // Show extra tooltips above finger / on-screen keyboard
@@ -548,10 +550,20 @@ void ui_end_input() {
current->is_key_pressed = true;
}
}
if (ui_touch_hold && current->input_down && current->input_x == current->input_started_x && current->input_y == current->input_started_y && current->input_started_time > 0 && iron_time() - current->input_started_time > 0.7) {
if (touch_hold_x > -1) {
current->input_x = touch_hold_x;
current->input_y = touch_hold_y;
touch_hold_x = -1;
touch_hold_y = -1;
current->input_released_r = true;
}
if (ui_touch_hold && current->input_down && current->input_x == current->input_started_x && current->input_y == current->input_started_y && current->input_started_time > 0 && iron_time() - current->input_started_time > 0.5) {
current->touch_hold_activated = true;
current->input_released = true;
current->input_released_r = true;
touch_hold_x = current->input_x;
touch_hold_y = current->input_y;
current->input_x = -1;
current->input_y = -1;
current->input_started_time = 0;
}
}
+2 -2
View File
@@ -52,14 +52,14 @@ function box_projects_tab() {
// Pick unique name
let i: i32 = 0;
let j: i32 = 0;
let title: string = tr("untitled") + i;
let title: string = "" + tr("untitled") + i;
while (j < config_raw.recent_projects.length) {
let base: string = config_raw.recent_projects[j];
base = substring(base, string_last_index_of(base, path_sep) + 1, string_last_index_of(base, "."));
j++;
if (title == base) {
i++;
title = tr("untitled") + i;
title = "" + tr("untitled") + i;
j = 0;
}
}