projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
android: make code 're-entrant' - i.e. NativeActivity can restart the program without...
[freeglut]
/
src
/
android
/
fg_window_android.c
diff --git
a/src/android/fg_window_android.c
b/src/android/fg_window_android.c
index
4c5d9d2
..
a6ce201
100644
(file)
--- a/
src/android/fg_window_android.c
+++ b/
src/android/fg_window_android.c
@@
-42,11
+42,10
@@
void fgPlatformOpenWindow( SFG_Window* window, const char* title,
GLboolean gameMode, GLboolean isSubWindow )
{
/* TODO: only one full-screen window possible? */
GLboolean gameMode, GLboolean isSubWindow )
{
/* TODO: only one full-screen window possible? */
- static int nb_windows = 0;
- if (nb_windows == 0) {
- nb_windows++;
+ if (fgDisplay.pDisplay.single_window == NULL) {
fgDisplay.pDisplay.single_window = window;
} else {
fgDisplay.pDisplay.single_window = window;
} else {
+ fgWarning("You can't have more than one window on Android");
return;
}
return;
}