input: prevent duplicate input configs

(cherry picked from commit 5fbf174c3644a64ee217c732190b16ab9b65120a)
This commit is contained in:
Alex Mirrlees-Black 2024-04-23 22:38:18 +10:00 committed by Isaac Freund
parent b2c4d38e09
commit 33cc85d5ef
No known key found for this signature in database
GPG Key ID: 86DED400DDFD7A11

View File

@ -91,6 +91,7 @@ pub fn input(
for (server.input_manager.configs.items) |*input_config| {
if (mem.eql(u8, input_config.glob, args[1])) {
try input_config.parse(args[2], args[3]);
break;
}
} else {
var input_config: InputConfig = .{