add db path candidates

main
Fabien Freling 2024-01-31 14:02:23 +01:00
parent 2b349d1287
commit 60351f8199
1 changed files with 10 additions and 1 deletions

View File

@ -21,7 +21,16 @@ func _ready():
var err = config.load(config_path)
if err == OK:
var db_path = config.get_value("general", "db_path")
load_db(db_path)
var db_success = load_db(db_path)
if not db_success:
# HACK: File picker on Android is broken
const possible_cfg_paths = ["/foo/bar/logue.cfg"]
for possible_path in possible_cfg_paths:
if FileAccess.file_exists(possible_path):
db_success = load_db(possible_path)
if db_success:
break
func switch_state(new: State):
var old = current_state