Fixed keyboard input not working, fixed accelerometer up/down swapped

This commit is contained in:
pelya
2010-05-21 14:13:34 +03:00
parent 96f845c824
commit 5f6fec3617
4 changed files with 21 additions and 23 deletions

View File

@@ -39,21 +39,17 @@ SDL_Surface *Video::init(){
// --------------------------------------------------
// SDL initialisation
// -----------------------------------------------------
__android_log_print(ANDROID_LOG_INFO, "Alien Blaster", "SDL_InitSubSystem(SDL_INIT_VIDEO)");
fullscreen = false;
if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) {
__android_log_print(ANDROID_LOG_INFO, "Alien Blaster", "Couldn't initialize SDL video subsystem: %s\n", SDL_GetError());
printf("Couldn't initialize SDL video subsystem: %s\n", SDL_GetError());
exit(1);
}
screen = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, BIT_DEPTH, SDL_DOUBLEBUF /* | SDL_FULLSCREEN */ );
if (!screen) {
__android_log_print(ANDROID_LOG_INFO, "Alien Blaster", "Couldn't set %dx%d, %dbit video mode: %s\n", SCREEN_WIDTH, SCREEN_HEIGHT, BIT_DEPTH, SDL_GetError());
printf("Couldn't set %dx%d, %dbit video mode: %s\n", SCREEN_WIDTH, SCREEN_HEIGHT, BIT_DEPTH, SDL_GetError());
exit(2);
}
__android_log_print(ANDROID_LOG_INFO, "Alien Blaster", "Video initialized");
SDL_WM_SetCaption("AlienBlaster", "AlienBlaster");
SDL_WM_SetIcon(SDL_LoadBMP( FN_ALIENBLASTER_ICON.c_str() ), NULL);