Skip to content

Instantly share code, notes, and snippets.

@michaelfairley
Created June 6, 2017 15:51
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save michaelfairley/4474b060aa89edea22cbf977411e0e46 to your computer and use it in GitHub Desktop.
Save michaelfairley/4474b060aa89edea22cbf977411e0e46 to your computer and use it in GitHub Desktop.
#![cfg_attr(any(target_os = "ios", target_os = "android"), no_main]
fn main() {
main2();
}
#[cfg(any(target_os = "ios", target_os = "android"))]
#[no_mangle]
#[allow(non_snake_case)]
pub extern "C" fn SDL_main() -> i32 {
main2();
0
}
fn main2() {
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment