From 2ec4332fe4307cb2ffd1012e35743ca2b2585f26 Mon Sep 17 00:00:00 2001 From: Lily Date: Sun, 24 Nov 2024 22:06:11 +0300 Subject: [PATCH] no more saveContent ig --- source/funkin/editors/SaveSubstate.hx | 5 ----- .../mobile/funkin/backend/utils/MobileUtil.hx | 19 ------------------- 2 files changed, 24 deletions(-) diff --git a/source/funkin/editors/SaveSubstate.hx b/source/funkin/editors/SaveSubstate.hx index cf0950bfc..628b4072c 100644 --- a/source/funkin/editors/SaveSubstate.hx +++ b/source/funkin/editors/SaveSubstate.hx @@ -26,10 +26,6 @@ class SaveSubstate extends MusicBeatSubstate { public override function create() { super.create(); - #if mobile - MobileUtil.saveContent(options.defaultSaveFile, data); - close(); - #else var fileDialog = new FileDialog(); fileDialog.onCancel.add(function() close()); fileDialog.onSelect.add(function(str) { @@ -37,7 +33,6 @@ class SaveSubstate extends MusicBeatSubstate { close(); }); fileDialog.browse(SAVE, options.saveExt.getDefault(Path.extension(options.defaultSaveFile)), options.defaultSaveFile); - #end } public override function update(elapsed:Float) { diff --git a/source/mobile/funkin/backend/utils/MobileUtil.hx b/source/mobile/funkin/backend/utils/MobileUtil.hx index ff8332e7a..7b62e8fc2 100644 --- a/source/mobile/funkin/backend/utils/MobileUtil.hx +++ b/source/mobile/funkin/backend/utils/MobileUtil.hx @@ -65,25 +65,6 @@ class MobileUtil return daPath; } - public static function saveContent(fileName:String, fileData:String, ?alert:Bool = true):Void - { - try - { - if (!FileSystem.exists('saves')) - FileSystem.createDirectory('saves'); - - File.saveContent('saves/$fileName', fileData); - if (alert) - NativeAPI.showMessageBox("Success!", '$fileName has been saved.', MSG_INFORMATION); - } - catch (e:haxe.Exception) - if (alert) - NativeAPI.showMessageBox("Error!", '$fileName couldn\'t be saved.\n(${e.message})', MSG_ERROR); - else - trace('$fileName couldn\'t be saved. (${e.message})'); - } - - #if android public static function requestPermissionsFromUser():Void {