1 2 3 4 5 6
//! Module contains sdl thread local static initialization use sdl2::{self, Sdl}; use std::cell::RefCell; thread_local! (pub static SDL_CONTEXT: RefCell<Sdl> = RefCell::new( sdl2::init().expect("[ERROR] Sdl init error, try --nosound")));