Skip to content

Commit fb2e888

Browse files
authored
Dev 8.0 (#886)
* Fix envar map handling, clamp verb set * Generalize Steam Deck APU description for OLED models * Update window focus, 8BitDo 2C type * Bump data * Add PowerA Wired Switch support (#876) * Mobile motion * Revert "Mobile motion" This reverts commit 55b14de. * Mapping correction * Safe blacklist CSV load * Update XInput for GMRT * Android gamepad fix * Bump data * Bump version * Reformat gyro struct names * Additional Wii U GCN vJoy driver config * Standardize Steam Input gyro scale thanks @HilariousCow * Update refresh_datafiles.py * Enable mouse movement while overlay is open thanks @Hmmmpf * Remove combos * Bump data * Bump data * 8BitDo GameCube type * Resolve raw type `CommunitySteamDeck` * Bump data * Bump version, add sponsor links to README * Master into dev (#883) * 8.0.1 Release (#882) * Fix envar map handling, clamp verb set * Generalize Steam Deck APU description for OLED models * Update window focus, 8BitDo 2C type * Bump data * Add PowerA Wired Switch support (#876) * Mobile motion * Revert "Mobile motion" This reverts commit 55b14de. * Mapping correction * Safe blacklist CSV load * Update XInput for GMRT * Android gamepad fix * Bump data * Bump version * Reformat gyro struct names * Additional Wii U GCN vJoy driver config * Standardize Steam Input gyro scale thanks @HilariousCow * Update refresh_datafiles.py * Enable mouse movement while overlay is open thanks @Hmmmpf * Remove combos * Bump data * Bump data * 8BitDo GameCube type * Resolve raw type `CommunitySteamDeck` * Bump data * Bump version, add sponsor links to README * Setup funding YML * Bump data, update data script source address * Add 3rd party PS3 Mapping * Bump version * Feature detection on string functions We've had at least 3 instances of people implementing their own `string_split` and reporting issues with Input loading, no more of that please...
1 parent 6d01a73 commit fb2e888

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

scripts/__input_initialize/__input_initialize.gml

+23-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,28 @@ function __input_initialize()
4848

4949
if not (_use_split_and_trim) __input_error("Error!\nGM extended string functions are unavailable. Please update GameMaker.");
5050

51+
//Detect non-native string_split(), which degrades loading particularly on YYC
52+
var _native_split;
53+
try
54+
{
55+
if (is_real(string_split))
56+
{
57+
//Native index boundary
58+
_native_split = (real(string_split) < 100000);
59+
}
60+
else
61+
{
62+
//GMRT native functions are structs
63+
_native_split = (is_struct(string_split));
64+
}
65+
}
66+
catch(_error)
67+
{
68+
_native_split = false;
69+
}
70+
71+
if not (_native_split) __input_trace_loud("Warning!\nFound indirection for GM native \"string_split\" function. Overriding \"string_split\" degrades load performance.");
72+
5173
//Detect is_instanceof(), which offers some minor performance gains
5274
if (INPUT_ON_WEB)
5375
{
@@ -441,7 +463,7 @@ function __input_initialize()
441463
}
442464
else if (__INPUT_ON_IOS)
443465
{
444-
_max_gamepads = 5;
466+
_max_gamepads = 5;
445467
}
446468
else if (__INPUT_ON_LINUX || __INPUT_ON_ANDROID)
447469
{

0 commit comments

Comments
 (0)