android fixes

This commit is contained in:
p.kosyh 2010-09-30 11:36:20 +00:00
parent fa119fd6ab
commit 7127f6de49
4 changed files with 11 additions and 7 deletions

View file

@ -2,7 +2,11 @@
#include "internals.h"
int opt_fsize = 0;
#ifndef MAEMO
#if defined(MAEMO) || defined(ANDROID)
int opt_fs = 1;
int opt_owntheme = 0;
int opt_hl = 0;
#else
#ifndef _WIN32_WCE
int opt_fs = 0;
int opt_owntheme = 1;
@ -12,10 +16,6 @@ int opt_fsize = 0;
int opt_owntheme = 1;
int opt_hl = 0;
#endif
#else
int opt_fs = 1;
int opt_owntheme = 0;
int opt_hl = 0;
#endif
int opt_hz = 22050;
int opt_vol = 127;

View file

@ -18,7 +18,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <errno.h>
#include <sys/fcntl.h>
#include <fcntl.h>
#include <ctype.h>
#include <dirent.h>
#include <time.h>

View file

@ -1039,6 +1039,9 @@ int gfx_set_mode(int w, int h, int fs)
gfx_width = w;
gfx_height = h;
SDL_ShowCursor(SDL_DISABLE);
#ifdef ANDROID
screen = SDL_SetVideoMode(gfx_width, gfx_height, 0, SDL_HWSURFACE | ( ( fs ) ? SDL_FULLSCREEN : 0 ) );
#else
#ifndef MAEMO
#ifdef __APPLE__
screen = SDL_SetVideoMode(gfx_width, gfx_height, (fs)?32:0, SDL_SWSURFACE | ( ( fs ) ? SDL_FULLSCREEN : 0 ) );
@ -1053,6 +1056,7 @@ int gfx_set_mode(int w, int h, int fs)
#endif
#else
screen = SDL_SetVideoMode(gfx_width, gfx_height, 16, SDL_DOUBLEBUF | SDL_HWSURFACE | ( ( fs ) ? SDL_FULLSCREEN : 0 ) );
#endif
#endif
if (screen == NULL) {
fprintf(stderr, "Unable to set %dx%d video: %s\n", w, h, SDL_GetError());

View file

@ -5,7 +5,7 @@
#include <sys/types.h>
#include <stdio.h>
#include <errno.h>
#include <sys/fcntl.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>