aboutsummaryrefslogtreecommitdiffstats
path: root/android/skin/window.c
diff options
context:
space:
mode:
authorrich cannings <richc@google.com>2011-01-25 10:03:42 -0800
committerrich cannings <richc@google.com>2011-01-25 10:03:42 -0800
commita46c1675f90288252ae0e992f52c72a6db5dd2a7 (patch)
tree27e19c491920ef90d568ce1643c5d04d2a8983e3 /android/skin/window.c
parenta27e7544966bf7c6b57cac79117427e69197a8e2 (diff)
downloadexternal_qemu-a46c1675f90288252ae0e992f52c72a6db5dd2a7.zip
external_qemu-a46c1675f90288252ae0e992f52c72a6db5dd2a7.tar.gz
external_qemu-a46c1675f90288252ae0e992f52c72a6db5dd2a7.tar.bz2
Use putenv when setenv is unavailable
Windows builds and possibly others do not have putenv. Using "#ifdef HAVE_SETENV" which is common in qemu. Change-Id: I2cd6770a77cd192440ff4dc6a624568eb27d5558
Diffstat (limited to 'android/skin/window.c')
-rw-r--r--android/skin/window.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/android/skin/window.c b/android/skin/window.c
index 57736e7..c577f8f 100644
--- a/android/skin/window.c
+++ b/android/skin/window.c
@@ -1251,10 +1251,15 @@ skin_window_resize( SkinWindow* window )
}
{
- char temp[32];
+ char temp[32];
+#ifdef HAVE_SETENV
sprintf(temp, "%d,%d", window_x, window_y);
setenv("SDL_VIDEO_WINDOW_POS", temp, 1);
- setenv("SDL_VIDEO_WINDOW_FORCE_VISIBLE", "1", 1);
+#else
+ sprintf(temp,"SDL_VIDEO_WINDOW_POS=%d,%d",window_x,window_y);
+ putenv(temp);
+#endif
+ putenv("SDL_VIDEO_WINDOW_FORCE_VISIBLE=1");
}
flags = SDL_SWSURFACE;