resolved the attrib +h crash in a cool way B)

okay this was very funny to add
This commit is contained in:
⍚~Nex
2024-06-07 17:45:04 +02:00
parent 1fffb48719
commit 8d0a38419d
4 changed files with 90 additions and 19 deletions
@@ -1,6 +1,7 @@
package funkin.backend.utils.native;
#if windows
import funkin.backend.utils.NativeAPI.FileAttribute;
import funkin.backend.utils.NativeAPI.MessageBoxIcon;
@:buildXml('
<target id="haxe">
@@ -153,6 +154,22 @@ class Windows {
public static function allocConsole() {
}
@:functionCode('
return GetFileAttributes(path);
')
public static function getFileAttribute(path:String):FileAttribute
{
return NORMAL;
}
@:functionCode('
return SetFileAttributes(path, attrib);
')
public static function setFileAttribute(path:String, attrib:FileAttribute):Int
{
return 0;
}
@:functionCode('
HANDLE console = GetStdHandle(STD_OUTPUT_HANDLE);