toGameControllerButton method
Get a game controller button.
Implementation
GameControllerButton toGameControllerButton(final Sdl sdl) {
final ptr = toCharPointer();
final i = sdl.sdl.SDL_GameControllerGetButtonFromString(ptr);
malloc.free(ptr);
final v = i.toGameControllerButton();
if (v == GameControllerButton.invalid) {
throw SdlError(0, 'Invalid game controller button "$this".');
}
return v;
}