mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Implement a "Recovery Mode" for recovering crashing/hanging projects during initialization
This commit is contained in:
@@ -182,23 +182,9 @@ void OS_Web::vibrate_handheld(int p_duration_ms, float p_amplitude) {
|
||||
godot_js_input_vibrate_handheld(p_duration_ms);
|
||||
}
|
||||
|
||||
String OS_Web::get_user_data_dir() const {
|
||||
String OS_Web::get_user_data_dir(const String &p_user_dir) const {
|
||||
String userfs = "/userfs";
|
||||
String appname = get_safe_dir_name(GLOBAL_GET("application/config/name"));
|
||||
if (!appname.is_empty()) {
|
||||
bool use_custom_dir = GLOBAL_GET("application/config/use_custom_user_dir");
|
||||
if (use_custom_dir) {
|
||||
String custom_dir = get_safe_dir_name(GLOBAL_GET("application/config/custom_user_dir_name"), true);
|
||||
if (custom_dir.is_empty()) {
|
||||
custom_dir = appname;
|
||||
}
|
||||
return userfs.path_join(custom_dir).replace("\\", "/");
|
||||
} else {
|
||||
return userfs.path_join(get_godot_dir_name()).path_join("app_userdata").path_join(appname).replace("\\", "/");
|
||||
}
|
||||
}
|
||||
|
||||
return userfs.path_join(get_godot_dir_name()).path_join("app_userdata").path_join("[unnamed project]");
|
||||
return userfs.path_join(p_user_dir).replace("\\", "/");
|
||||
}
|
||||
|
||||
String OS_Web::get_cache_path() const {
|
||||
|
||||
Reference in New Issue
Block a user