toGameControllerAxis method
Convert to a game controller axis.
Implementation
GameControllerAxis toGameControllerAxis(final Sdl sdl) {
final ptr = toCharPointer();
final i = sdl.sdl.SDL_GameControllerGetAxisFromString(ptr);
malloc.free(ptr);
final v = i.toGameControllerAxis();
if (v == GameControllerAxis.invalid) {
throw SdlError(0, 'Invalid axis string "$this".');
}
return v;
}