glfw: Eliminate Error.InvalidValue
This commit is contained in:
parent
683c60bdfe
commit
1d648c2256
7 changed files with 79 additions and 33 deletions
|
|
@ -395,7 +395,11 @@ pub inline fn updateGamepadMappings(gamepad_mappings: [*:0]const u8) Error!void
|
|||
internal_debug.assertInitialized();
|
||||
_ = c.glfwUpdateGamepadMappings(gamepad_mappings);
|
||||
getError() catch |err| return switch (err) {
|
||||
Error.InvalidValue => err, // TODO: Evaluate if this is preventable, or if this is like a parsing error which should definitely be returned
|
||||
// TODO: Maybe return as 'ParseError' here?
|
||||
// TODO: Look into upstream proposal for GLFW to publicize
|
||||
// their Gamepad mappings parsing functions/interface
|
||||
// for a better error message in debug.
|
||||
Error.InvalidValue => err,
|
||||
else => unreachable,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue