From 6b47867e44aed3107483df6de2821acc73aaab6b Mon Sep 17 00:00:00 2001
From: "p.kosyh"
Date: Fri, 1 Oct 2010 09:19:32 +0000
Subject: [PATCH] android fix
---
src/sdl-instead/game.c | 6 ++++++
src/sdl-instead/sound.c | 5 ++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/sdl-instead/game.c b/src/sdl-instead/game.c
index 5451bde..5e19e1d 100644
--- a/src/sdl-instead/game.c
+++ b/src/sdl-instead/game.c
@@ -469,6 +469,12 @@ int game_apply_theme(void)
int w = opt_mode[0];
int h = opt_mode[1];
+#ifdef ANDROID
+ if ((w == -1) && opt_fs && !gfx_get_max_mode(&w, &h)) {
+ opt_mode[0] = w;
+ opt_mode[1] = h;
+ }
+#endif
if ((w == -1)
&& (gfx_get_max_mode(&w, &h) || (game_theme.w <= w && game_theme.h <= h))) {
w = opt_mode[0];
diff --git a/src/sdl-instead/sound.c b/src/sdl-instead/sound.c
index b9af001..d8917d4 100644
--- a/src/sdl-instead/sound.c
+++ b/src/sdl-instead/sound.c
@@ -55,8 +55,11 @@ int snd_hz(void)
}
int alsa_sw = 0;
+#ifdef ANDROID
+int nosound_sw = 1; /* TODO: help !!! */
+#else
int nosound_sw = 0;
-
+#endif
void snd_pause(int on)
{
if (!sound_on)