I cant get hidden process working >:((((
This commit is contained in:
@@ -95,6 +95,11 @@ class Paths
|
||||
return getPath('data/$key.json', TEXT, library);
|
||||
}
|
||||
|
||||
inline static public function ps1(key:String, ?library:String)
|
||||
{
|
||||
return getPath('data/$key.ps1', TEXT, library);
|
||||
}
|
||||
|
||||
static public function sound(key:String, ?library:String)
|
||||
{
|
||||
return getPath('sounds/$key.$SOUND_EXT', SOUND, library);
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package funkin.system.framerate;
|
||||
|
||||
import funkin.utils.MemoryUtil;
|
||||
|
||||
class FlixelInfo extends FramerateCategory {
|
||||
public function new() {
|
||||
super("Flixel Info");
|
||||
|
||||
@@ -1,28 +1,29 @@
|
||||
package funkin.system.framerate;
|
||||
|
||||
import native.HiddenProcess;
|
||||
import funkin.utils.MemoryUtil;
|
||||
|
||||
using StringTools;
|
||||
|
||||
class SystemInfo extends FramerateCategory {
|
||||
public static var osInfo:String = "Unknown";
|
||||
public static var gpuName:String = "Unknown";
|
||||
public static var vRAM:String = "-1 MB";
|
||||
public static var vRAM:String = "Unknown";
|
||||
public static var cpuName:String = "Unknown";
|
||||
public static var totalMem:String = "Unknown";
|
||||
public static var memType:String = "Unknown";
|
||||
|
||||
public static inline function init() {
|
||||
osInfo = '${lime.system.System.platformLabel} ${lime.system.System.platformVersion}';
|
||||
@:privateAccess {
|
||||
gpuName = Std.string(flixel.FlxG.stage.context3D.gl.getParameter(flixel.FlxG.stage.context3D.gl.RENDERER)).split("/")[0];
|
||||
vRAM = CoolUtil.getSizeString(cast(flixel.FlxG.stage.context3D.gl.getParameter(openfl.display3D.Context3D.__glMemoryTotalAvailable), UInt) * 1000);
|
||||
}
|
||||
osInfo = '${lime.system.System.platformLabel.replace(lime.system.System.platformVersion, "")} ${lime.system.System.platformVersion}';
|
||||
|
||||
#if windows
|
||||
var process = new sys.io.Process("wmic", ["cpu", "get", "name"]);
|
||||
var process = new HiddenProcess("wmic", ["cpu", "get", "name"]);
|
||||
if (process.exitCode() == 0) cpuName = process.stdout.readAll().toString().trim().split("\n")[1].trim();
|
||||
#elseif (mac)
|
||||
var process = new sys.io.Process("sysctl -a | grep brand");
|
||||
#elseif mac
|
||||
var process = new HiddenProcess("sysctl -a | grep brand");
|
||||
if (process.exitCode() == 0) cpuName = process.stdout.readAll().toString().trim().split(":")[1].trim();
|
||||
#else
|
||||
var process = new sys.io.Process("cat", ["/proc/cpuinfo"]);
|
||||
#elseif linux
|
||||
var process = new HiddenProcess("cat", ["/proc/cpuinfo"]);
|
||||
if (process.exitCode() != 0) return;
|
||||
|
||||
for (line in process.stdout.readAll().toString().split("\n")) {
|
||||
@@ -32,6 +33,16 @@ class SystemInfo extends FramerateCategory {
|
||||
}
|
||||
}
|
||||
#end
|
||||
|
||||
@:privateAccess {
|
||||
gpuName = Std.string(flixel.FlxG.stage.context3D.gl.getParameter(flixel.FlxG.stage.context3D.gl.RENDERER)).split("/")[0];
|
||||
vRAM = CoolUtil.getSizeString(cast(flixel.FlxG.stage.context3D.gl.getParameter(openfl.display3D.Context3D.__glMemoryTotalAvailable), UInt) * 1000);
|
||||
}
|
||||
|
||||
#if cpp
|
||||
totalMem = Std.string(MemoryUtil.getTotalMem() / 1024) + " GB";
|
||||
#end
|
||||
memType = MemoryUtil.getMemType();
|
||||
}
|
||||
|
||||
public function new() {
|
||||
@@ -42,7 +53,8 @@ class SystemInfo extends FramerateCategory {
|
||||
if (alpha <= 0.05) return;
|
||||
_text = 'System: $osInfo';
|
||||
_text += '\nCPU: ${cpuName} ${openfl.system.Capabilities.cpuArchitecture} ${(openfl.system.Capabilities.supports64BitProcesses ? '64-Bit' : '32-Bit')}';
|
||||
_text += '\nGPU: ${gpuName} | VRAM $vRAM';
|
||||
if (gpuName != cpuName) _text += '\nGPU: ${gpuName} | VRAM $vRAM'; // 1000 bytes of vram (apus)
|
||||
_text += '\nTotal MEM: ${totalMem} $memType';
|
||||
_text += '\nGarbage Collector: ${MemoryUtil.disableCount > 0 ? "OFF" : "ON"} (${MemoryUtil.disableCount})';
|
||||
|
||||
this.text.text = _text;
|
||||
|
||||
Reference in New Issue
Block a user