Fix SDL global variable uninitialized bug