From aae7dcdada565307a22c80a82666a8e4e1837d2e Mon Sep 17 00:00:00 2001 From: AbnormalPoof Date: Mon, 16 Sep 2024 23:35:23 -0500 Subject: [PATCH] fix crash when opening urls --- source/funkin/ui/mainmenu/MainMenuState.hx | 4 ++-- source/funkin/util/WindowUtil.hx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/funkin/ui/mainmenu/MainMenuState.hx b/source/funkin/ui/mainmenu/MainMenuState.hx index 13d68da6d..588e4cb29 100644 --- a/source/funkin/ui/mainmenu/MainMenuState.hx +++ b/source/funkin/ui/mainmenu/MainMenuState.hx @@ -123,7 +123,7 @@ class MainMenuState extends MusicBeatState })); }); - #if CAN_OPEN_LINKS + #if FEATURE_OPEN_URL // In order to prevent popup blockers from triggering, // we need to open the link as an immediate result of a keypress event, // so we can't wait for the flicker animation to complete. @@ -234,7 +234,7 @@ class MainMenuState extends MusicBeatState camFollow.setPosition(selected.getGraphicMidpoint().x, selected.getGraphicMidpoint().y); } - #if CAN_OPEN_LINKS + #if FEATURE_OPEN_URL function selectDonate() { WindowUtil.openURL(Constants.URL_ITCH); diff --git a/source/funkin/util/WindowUtil.hx b/source/funkin/util/WindowUtil.hx index 0fe63fe32..aabaa495b 100644 --- a/source/funkin/util/WindowUtil.hx +++ b/source/funkin/util/WindowUtil.hx @@ -22,7 +22,7 @@ class WindowUtil */ public static function openURL(targetUrl:String):Void { - #if CAN_OPEN_LINKS + #if FEATURE_OPEN_URL #if linux Sys.command('/usr/bin/xdg-open $targetUrl &'); #else @@ -40,7 +40,7 @@ class WindowUtil */ public static function openFolder(targetPath:String):Void { - #if CAN_OPEN_LINKS + #if FEATURE_OPEN_URL #if windows Sys.command('explorer', [targetPath.replace('/', '\\')]); #elseif mac @@ -59,7 +59,7 @@ class WindowUtil */ public static function openSelectFile(targetPath:String):Void { - #if CAN_OPEN_LINKS + #if FEATURE_OPEN_URL #if windows Sys.command('explorer', ['/select,' + targetPath.replace('/', '\\')]); #elseif mac