Skip to content

Commit

Permalink
native update
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackx2 committed Dec 9, 2024
1 parent 29a024e commit 9c6cae4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion source/funkin/backend/funkinLua/HScript.hx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ class HScript extends Iris
set('FlxAnimate', FlxAnimate);
#end
set('osName', OsAPI.username);
set('osNameHash',OsAPI.hashUsername);
// MD5
set('osNameHash',OsAPI.hashUsernameMD5);

// Functions & Variables
set('setVar', function(name:String, value:Dynamic) {
Expand Down
4 changes: 2 additions & 2 deletions source/funkin/backend/utils/native/OsAPI.hx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import haxe.crypto.Md5;
class OsAPI
{
public static var username(get, null):String;
public static var hashUsername(get, null):String;
public static var hashUsernameMD5(get, null):String;
public static var osInfo(get, never):String;
public static var osVersion(get, never):String;

Expand Down Expand Up @@ -37,6 +37,6 @@ class OsAPI
private static inline function get_osVersion()
return lime.system.System.platformVersion;

@:noCompletion private inline static function get_hashUsername()
@:noCompletion private inline static function get_hashUsernameMD5()
return HashUtils.hash(username, MD5);
}
1 change: 1 addition & 0 deletions source/funkin/backend/utils/native/WindowUtil.hx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class WindowUtil

// Windows 11 support????????
if (!OsAPI.osInfo.contains('11')){
// meh
Application.current.window.borderless = true;
Application.current.window.borderless = false;
}
Expand Down

0 comments on commit 9c6cae4

Please sign in to comment.