android fixes
This commit is contained in:
parent
fa119fd6ab
commit
7127f6de49
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in a new issue