mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-03-25 11:29:28 +00:00
fix crash when opening urls
This commit is contained in:
parent
d4cd2d031c
commit
aae7dcdada
|
@ -123,7 +123,7 @@ class MainMenuState extends MusicBeatState
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
#if CAN_OPEN_LINKS
|
#if FEATURE_OPEN_URL
|
||||||
// In order to prevent popup blockers from triggering,
|
// In order to prevent popup blockers from triggering,
|
||||||
// we need to open the link as an immediate result of a keypress event,
|
// 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.
|
// 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);
|
camFollow.setPosition(selected.getGraphicMidpoint().x, selected.getGraphicMidpoint().y);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CAN_OPEN_LINKS
|
#if FEATURE_OPEN_URL
|
||||||
function selectDonate()
|
function selectDonate()
|
||||||
{
|
{
|
||||||
WindowUtil.openURL(Constants.URL_ITCH);
|
WindowUtil.openURL(Constants.URL_ITCH);
|
||||||
|
|
|
@ -22,7 +22,7 @@ class WindowUtil
|
||||||
*/
|
*/
|
||||||
public static function openURL(targetUrl:String):Void
|
public static function openURL(targetUrl:String):Void
|
||||||
{
|
{
|
||||||
#if CAN_OPEN_LINKS
|
#if FEATURE_OPEN_URL
|
||||||
#if linux
|
#if linux
|
||||||
Sys.command('/usr/bin/xdg-open $targetUrl &');
|
Sys.command('/usr/bin/xdg-open $targetUrl &');
|
||||||
#else
|
#else
|
||||||
|
@ -40,7 +40,7 @@ class WindowUtil
|
||||||
*/
|
*/
|
||||||
public static function openFolder(targetPath:String):Void
|
public static function openFolder(targetPath:String):Void
|
||||||
{
|
{
|
||||||
#if CAN_OPEN_LINKS
|
#if FEATURE_OPEN_URL
|
||||||
#if windows
|
#if windows
|
||||||
Sys.command('explorer', [targetPath.replace('/', '\\')]);
|
Sys.command('explorer', [targetPath.replace('/', '\\')]);
|
||||||
#elseif mac
|
#elseif mac
|
||||||
|
@ -59,7 +59,7 @@ class WindowUtil
|
||||||
*/
|
*/
|
||||||
public static function openSelectFile(targetPath:String):Void
|
public static function openSelectFile(targetPath:String):Void
|
||||||
{
|
{
|
||||||
#if CAN_OPEN_LINKS
|
#if FEATURE_OPEN_URL
|
||||||
#if windows
|
#if windows
|
||||||
Sys.command('explorer', ['/select,' + targetPath.replace('/', '\\')]);
|
Sys.command('explorer', ['/select,' + targetPath.replace('/', '\\')]);
|
||||||
#elseif mac
|
#elseif mac
|
||||||
|
|
Loading…
Reference in a new issue