fix in video initting, now ANDROID mode is a hack

This commit is contained in:
p.kosyh@gmail.com 2011-03-06 16:33:41 +00:00
parent 08a62107bb
commit 159a604a1a
2 changed files with 11 additions and 9 deletions

View file

@ -740,10 +740,10 @@ int game_init(const char *name)
if (name)
game_err_msg(NULL);
// if (gfx_video_init() || input_init())
// return -1;
#ifndef ANDROID
if (gfx_video_init() || input_init())
return -1;
#endif
snd_init(opt_hz);
game_change_vol(0, opt_vol);
@ -846,7 +846,9 @@ void game_done(int err)
input_clear();
snd_done();
instead_done();
// gfx_video_done();
#ifndef ANDROID
gfx_video_done();
#endif
curgame_dir = NULL;
game_own_theme = 0;
// SDL_Quit();

View file

@ -288,22 +288,22 @@ int main(int argc, char *argv[])
// Initialize SDL
if (gfx_init() < 0)
return -1;
#ifdef ANDROID
if (gfx_video_init() || input_init())
return -1;
#endif
if (game_init(opt_game)) {
game_error(opt_game);
}
game_loop();
cfg_save();
game_done(0);
gfx_video_done();
#ifndef ANDROID
gfx_done();
#else
gfx_video_done();
#endif
out:
if (debug_sw)