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

Commit 6dd9866

Browse files
offalynneJujuAdamsnot-tomo
authored
v10.2 (#977)
* Block "Apple Extended Controller" * Hotswap fixes (#968) * Add `InputBufferPressed()` * typo in `InputBindingSet()` Signed-off-by: Alynne <alviscera@gmail.com> * handle undefined for `__InputBindingIsThumbstick()` Signed-off-by: Alynne <alviscera@gmail.com> * Cluster validation (#957) * normalise `VirtualButton` debug vector * Provisional WASM support thanks @tabularelf * Block dysfunctional NSO controllers on Apple Mobile Signed-off-by: Alynne <alviscera@gmail.com> * Fix hotswap thrashing * Adds `objTest007_Hotswap` * Moves a bunch of code in the main update loop to the collect loop * Fixes debug output in hotswap tester --------- Signed-off-by: Alynne <alviscera@gmail.com> Co-authored-by: alynne o. <alviscera@gmail.com> * Validate `INPUT_CURSOR_CLUSTER` * Bump data * Remove remaining string templates * Adds safety check to `InputBindingsImport()` * Disconnected players now forced to leave if party join is active * Update Create_0.gml * Update rmTest.yy * Adds error message when trying to set P2+ devices whilst hotswapping * Fixes console gamepad not being assigned to P1 on boot (#974) * Correct dpad axis bug, bump data * Add Feather disable/annotations where missing (#970) (#976) * Add Feather disable/annotations where missing * Update __InputConfigVerbs.gml --------- Co-authored-by: not-tomo <not-tomo@users.noreply.github.com> * Bump version --------- Signed-off-by: Alynne <alviscera@gmail.com> Co-authored-by: Juju Adams <julian.adams@email.com> Co-authored-by: not-tomo <not-tomo@users.noreply.github.com>
1 parent 5c5caf6 commit 6dd9866

File tree

30 files changed

+571
-472
lines changed

30 files changed

+571
-472
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<p align="center"><img src="https://raw.githubusercontent.com/offalynne/input/main/LOGO.png" style="display:block; margin:auto; width:300px"></p>
22

3-
<h1 align="center">Input 10.1.0</h1>
3+
<h1 align="center">Input 10.2.0</h1>
44

5-
<p align="center">Comprehensive cross-platform input for GameMaker 2024.13 by <a href="https://www.jujuadams.com/" target="_blank">Juju Adams</a>, <a href="https://offalynne.neocities.org/">Alynne Keith</a>, and <a href="https://offalynne.github.io/Input/#/10.0/Credits">Friends</a></p>
5+
<p align="center">Comprehensive cross-platform input for GameMaker 2024.13 by <a href="https://www.jujuadams.com/" target="_blank">Juju Adams</a>, <a href="https://offalynne.neocities.org/">Alynne Keith</a>, and <a href="https://offalynne.github.io/Input/#/10.2/Credits">Friends</a></p>
66

77
&nbsp;
88

@@ -16,4 +16,4 @@
1616

1717
&nbsp;
1818

19-
<p align="center">Looking for Input 8 for GameMaker LTS 2022? <a href="https://github.com/offalynne/Input/tree/dev_8.1">Code</a>, <a href="https://offalynne.github.io/Input/#/8.1/">Documentation</a>, <a href="https://github.com/offalynne/Input/releases/tag/8.1.3">Release (.yymps)</a></p>
19+
<p align="center">Looking for Input 8 for GameMaker LTS 2022? <a href="https://github.com/offalynne/Input/tree/dev_8.1">Code</a>, <a href="https://offalynne.github.io/Input/#/8.1/">Documentation</a>, <a href="https://github.com/offalynne/Input/releases/tag/8.1.4">Release (.yymps)</a></p>

datafiles/gamecontrollerdb.txt

Lines changed: 185 additions & 204 deletions
Large diffs are not rendered by default.

input.yyp

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
InputSetHotswapCallback(function()
2+
{
3+
show_debug_message($"time = {string_format(current_time, 7, 0)} frame = {__InputSystem().__frame}, hotswapped!");
4+
});
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// step
2+
var _controller = InputPlayerUsingGamepad() ? "YES" : "no";
3+
var _pressed = InputPressed(INPUT_VERB.ACCEPT) ? "PRESSED" : "unpressed";
4+
var _held = InputCheck(INPUT_VERB.ACCEPT) ? "HELD" : "unheld";
5+
6+
show_debug_message($"time = {string_format(current_time, 7, 0)} frame = {__InputSystem().__frame}, controller : {_controller}, Check : {_pressed}, {_held}");

objects/objTest007_Hotswap/objTest007_Hotswap.yy

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
// Feather disable all
22

3+
if (INPUT_MAX_PLAYERS < 2)
4+
{
5+
__InputError($"`INPUT_MAX_PLAYERS` ({INPUT_MAX_PLAYERS}) must be set to 2 or more");
6+
}
7+
38
InputPartySetParams(INPUT_VERB.ACCEPT, 2, 2, true, INPUT_VERB.CANCEL, function() { show_debug_message("Aborted!") }, true);
49
InputPartySetJoin(true)

refresh_data.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"match id": "(.{4}),(.{4})," + marker_id,
3232
}
3333
},
34-
"prefix": "// Feather disable all\n\nfunction __InputCreateTypeLookup()\n{\n static _struct = (function()\n {\n var _struct = {};\n",
34+
"prefix": "// Feather disable all\n// This script is generated by `./refresh_data.py`\n\nfunction __InputCreateTypeLookup()\n{\n static _struct = (function()\n {\n var _struct = {};\n",
3535
"suffix": "\n return _struct;\n })();\n \n return _struct;\n}\n"
3636
}
3737
}
@@ -58,8 +58,16 @@
5858

5959
try:
6060
print("Refreshing gamecontrollerdb.txt…")
61-
with urllib.request.urlopen(gamecontrollerdb_url) as response, open(gamecontrollerdb_path, 'wb') as out_file:
62-
shutil.copyfileobj(response, out_file)
61+
with urllib.request.urlopen(gamecontrollerdb_url) as response:
62+
63+
#strip ios maps
64+
text = response.read().decode().split("# iOS", 1)[0]
65+
66+
#remap dpad-only axis to thumbstick
67+
#TODO: fixed upstream, deprecate upon 2024.14 monthly release
68+
text = re.sub(r"dpdown:\+a(\d+),dpleft:-a(\d+),dpright:\+a\2,dpup:-a\1", r"leftx:a\2,lefty:a\1", text)
69+
70+
open(gamecontrollerdb_path, 'w', encoding="utf-8").write(text.rstrip("\n") + "\n")
6371
print("\tSaved to " + gamecontrollerdb_path)
6472
except Exception as e:
6573
print(e)

rooms/rmTest/rmTest.yy

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/InputBindingsImport/InputBindingsImport.gml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ function InputBindingsImport(_forGamepad, _data, _playerIndex = 0)
1616

1717
__INPUT_VALIDATE_PLAYER_INDEX
1818

19+
if (not is_struct(_data))
20+
{
21+
__InputError("`data` parameter must be a struct created by `InputBindingsExport()`.");
22+
}
23+
1924
var _bindingArray = _forGamepad? _playerArray[_playerIndex].__gamepadBindingArray : _playerArray[_playerIndex].__kbmBindingArray;
2025
var _i = 0;
2126
repeat(_verbCount)

0 commit comments

Comments
 (0)