File tree 1 file changed +23
-1
lines changed
scripts/__input_initialize
1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,28 @@ function __input_initialize()
48
48
49
49
if not (_use_split_and_trim) __input_error (" Error!\n GM extended string functions are unavailable. Please update GameMaker." );
50
50
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!\n Found indirection for GM native \" string_split\" function. Overriding \" string_split\" degrades load performance." );
72
+
51
73
// Detect is_instanceof(), which offers some minor performance gains
52
74
if (INPUT_ON_WEB)
53
75
{
@@ -441,7 +463,7 @@ function __input_initialize()
441
463
}
442
464
else if (__INPUT_ON_IOS)
443
465
{
444
- _max_gamepads = 5 ;
466
+ _max_gamepads = 5 ;
445
467
}
446
468
else if (__INPUT_ON_LINUX || __INPUT_ON_ANDROID)
447
469
{
You can’t perform that action at this time.
0 commit comments