brson / rust-sdl

SDL bindings for Rust
MIT License
179 stars 52 forks source link

Add SDL_main oriented variant of sdl-demo/main.rs, named sdl_main.rs #120

Closed pnkfelix closed 10 years ago

pnkfelix commented 10 years ago

A variant of sdl-demo/main.rs that is designed to be used with the platform-specific SDL_main C/C++/Objective-C sources that take care of requirements that have to be taken care of on the main-thread before handing off control to the user's event loop.

Fix #96, #118.

I tried to include documentation of how to actually build this thing, but its probably not the ideal method.

Anyway, as far as I can tell, this is a closer match to the intent of the SDL-distributed demos on win32 and Mac OS that redefine main as SDL_main and define their own main; see the preprocessor directives in SDL_main.h.

pnkfelix commented 10 years ago

Adding #96 to the set of issues this fixes.