Skip to content

Commit d4fc5be

Browse files
committed
remove StorageUtil.saveContent and use CoolUtil.showPopUp for GPU tex errors
1 parent 376a39d commit d4fc5be

3 files changed

Lines changed: 2 additions & 22 deletions

File tree

source/engine/mobile/backend/StorageUtil.hx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,6 @@ class StorageUtil
2525
}
2626
#end
2727

28-
public static function saveContent(fileName:String, fileData:String, ?alert:Bool = true):Void
29-
{
30-
final folder:String = Sys.getCwd() + 'saves/';
31-
32-
try
33-
{
34-
if (!FileSystem.exists(folder))
35-
FileSystem.createDirectory(folder);
36-
37-
File.saveContent('$folder$fileName', fileData);
38-
if (alert)
39-
CoolUtil.showPopUp('$fileName has been saved.', "Success!");
40-
}
41-
catch (e:Dynamic)
42-
if (alert)
43-
CoolUtil.showPopUp('$fileName couldn\'t be saved.\n(${e.message})', "Error!")
44-
else
45-
trace('$fileName couldn\'t be saved. (${e.message})');
46-
}
47-
4828
#if android
4929
public static function requestPermissions():Void
5030
{

source/library_shadows/gpu_textures/openfl/display3D/textures/ASTCTexture.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import openfl.Lib;
4848
{
4949
if (!__warned)
5050
{
51-
Lib.current.stage.window.alert("ASTC compression (LDR and HDR) is not available on this device.", "Rendering Error!");
51+
backend.CoolUtil.showPopUp("ASTC compression (LDR and HDR) is not available on this device.", "Rendering Error!");
5252
__warned = true;
5353
}
5454
supported = false;

source/library_shadows/gpu_textures/openfl/display3D/textures/BCTexture.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ import openfl.Lib;
6161
{
6262
if (!__warned)
6363
{
64-
Lib.current.stage.window.alert('BC compression for $__bcFormat is not available on this device.', "Rendering Error!");
64+
backend.CoolUtil.showPopUp('BC compression for $__bcFormat is not available on this device.', "Rendering Error!");
6565
__warned = true;
6666
}
6767
supported = false;

0 commit comments

Comments
 (0)