projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From http://www.jwz.org/xscreensaver/xscreensaver-5.35.tar.gz
[xscreensaver]
/
utils
/
visual.c
diff --git
a/utils/visual.c
b/utils/visual.c
index b3f06061a01b41b58261b2564b52a3735fe3eca6..89b4f33e69f3d7af84fc2a5931ae594c1916a47e 100644
(file)
--- a/
utils/visual.c
+++ b/
utils/visual.c
@@
-19,11
+19,14
@@
#include "visual.h"
#include <string.h>
#include "visual.h"
#include <string.h>
+#ifndef HAVE_ANDROID
#include <X11/Xutil.h>
#include <X11/Xutil.h>
+#else
+#include "../android/android-visual.h"
+#endif
extern char *progname;
extern char *progname;
-
#ifndef isupper
# define isupper(c) ((c) >= 'A' && (c) <= 'Z')
#endif
#ifndef isupper
# define isupper(c) ((c) >= 'A' && (c) <= 'Z')
#endif
@@
-295,7
+298,7
@@
pick_best_gl_visual (Screen *screen)
int ndepths = 0;
int *depths = XListDepths (dpy, screen_number (screen), &ndepths);
int ndepths = 0;
int *depths = XListDepths (dpy, screen_number (screen), &ndepths);
- int screen_depth =
depths[ndepths]
;
+ int screen_depth =
(depths && ndepths) ? depths[ndepths - 1] : 0
;
XFree (depths);
vi_in.class = TrueColor;
XFree (depths);
vi_in.class = TrueColor;