toSdlBool method

SdlBool toSdlBool()

Convert from a SDL_bool member.

Implementation

SdlBool toSdlBool() {
  switch (this) {
    case SDL_bool.SDL_FALSE:
      return SdlBool.false_;
    case SDL_bool.SDL_TRUE:
      return SdlBool.true_;
    default:
      throw SdlError(
        this,
        'Unrecognised `SDL_bool` member.',
      );
  }
}