Small HTML5 Fixes

This commit is contained in:
Ne_Eo
2025-05-16 01:03:53 +02:00
parent 6480465d51
commit c6c870270f
3 changed files with 21 additions and 21 deletions
@@ -12,9 +12,7 @@ class FlixelInfo extends FramerateCategory {
@:privateAccess {
var c:Int = 0;
for(_ in FlxG.bitmap._cache.keys())
c++;
var c:Int = Lambda.count(FlxG.bitmap._cache);
if((FlxG.state is ModState)) {
var state:ModState = cast FlxG.state;
@@ -27,6 +25,7 @@ class FlixelInfo extends FramerateCategory {
_text += '\nBitmaps Count: ${c}';
_text += '\nSounds Count: ${FlxG.sound.list.length}';
_text += '\nFlxG.game Childs Count: ${FlxG.game.numChildren}';
if(FlxG.renderBlit) _text += '\nBlitting Render: true';
// _text += '\nCached objects count: ${cachedObjects}';
#if FLX_POINT_POOL
//var points = flixel.math.FlxPoint.FlxBasePoint.pool;
@@ -82,7 +82,7 @@ class SystemInfo extends FramerateCategory {
Logs.trace('Unable to grab CPU Name: $e', ERROR, RED);
}
@:privateAccess {
@:privateAccess if(FlxG.renderTile) { // Blit doesn't enable the gpu. Idk if we should fix this
if (flixel.FlxG.stage.context3D != null && flixel.FlxG.stage.context3D.gl != null) {
gpuName = Std.string(flixel.FlxG.stage.context3D.gl.getParameter(flixel.FlxG.stage.context3D.gl.RENDERER)).split("/")[0].trim();
#if !flash
+18 -17
View File
@@ -1,5 +1,8 @@
package funkin.backend.utils;
import haxe.zip.Entry;
import haxe.zip.Reader;
#if sys
#if (!macro && sys)
import openfl.display.BitmapData;
@@ -9,8 +12,6 @@ import haxe.Exception;
import haxe.Json;
import haxe.crypto.Crc32;
import haxe.zip.Compress;
import haxe.zip.Entry;
import haxe.zip.Reader;
import haxe.zip.Tools;
import haxe.zip.Uncompress;
import haxe.zip.Writer;
@@ -227,20 +228,6 @@ class ZipProgress {
public function new() {}
}
class ZipReader extends Reader {
public var files:List<Entry>;
public override function read() {
if (files != null) return files;
try {
var files = super.read();
return this.files = files;
} catch(e) {
}
return new List<Entry>();
}
}
class ZipWriter extends Writer {
public function flush() {
o.flush();
@@ -265,4 +252,18 @@ class StrNameLabel {
this.label = label;
}
}
#end
#end
class ZipReader extends Reader {
public var files:List<Entry>;
public override function read() {
if (files != null) return files;
try {
var files = super.read();
return this.files = files;
} catch(e) {
}
return new List<Entry>();
}
}