Skip to content
This repository was archived by the owner on Feb 1, 2026. It is now read-only.
/ Input Public archive

Commit 9925bf1

Browse files
committed
Improves localhost detection
1 parent 86c765b commit 9925bf1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/__input_initialize/__input_initialize.gml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ function __input_initialize()
3636
__input_trace("Warning! Running on a GM runtime earlier than 2022 LTS");
3737
}
3838

39-
if ((string_pos("127.0.0.1", parameter_string(0)) > 0) && ((os_browser != browser_not_a_browser) || (os_type == os_operagx)))
39+
if (((string_pos("127.0.0.1", parameter_string(0)) > 0) || (string_pos("localhost", parameter_string(0)) > 0)) && (os_browser != browser_not_a_browser))
40+
{
41+
show_message("Due to changes in security policy, some browsers may not permit the use of gamepads when testing locally.\n \nPlease host on a remote web service (itch.io, GX.games, etc.) if you are encountering problems.");
42+
}
43+
44+
if ((GM_build_type == "run") && (os_type == os_operagx))
4045
{
4146
show_message("Due to changes in security policy, some browsers may not permit the use of gamepads when testing locally.\n \nPlease host on a remote web service (itch.io, GX.games, etc.) if you are encountering problems.");
4247
}

0 commit comments

Comments
 (0)