[−][src]Function beryllium::init
pub fn init() -> Result<SDLToken, String>
Initializes SDL2 and gives you a token as proof, or an error message.
Failure
- You cannot double initialize SDL2, you'll get an error.
- If SDL2 fails to initialize you'll get an error and it will revert itself to an uninitialized state, perhaps allowing you to try again.
- If you call this function on macOS or iOS and are not on the main thread, you get an error.