X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fglslideshow.c;h=3e3548d8e08f6df20ded6b18d5c73c3b81fd11ab;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hp=bf5f87d22428cbb761a29bf450b899404af1391c;hpb=6afd6db0ae9396cd7ff897ade597cd5483f49b0e;p=xscreensaver diff --git a/hacks/glx/glslideshow.c b/hacks/glx/glslideshow.c index bf5f87d2..3e3548d8 100644 --- a/hacks/glx/glslideshow.c +++ b/hacks/glx/glslideshow.c @@ -73,7 +73,7 @@ "*showFPS: False \n" \ "*fpsSolid: True \n" \ "*useSHM: True \n" \ - "*titleFont: -*-helvetica-medium-r-normal-*-180-*\n" \ + "*titleFont: -*-helvetica-medium-r-normal-*-*-180-*-*-*-*-*-*\n" \ "*desktopGrabber: xscreensaver-getimage -no-desktop %s\n" \ "*grabDesktopImages: False \n" \ "*chooseRandomImages: True \n" @@ -99,7 +99,7 @@ # define DEF_MIPMAP "True" #include "grab-ximage.h" -#include "glxfonts.h" +#include "texfont.h" typedef struct { double x, y, w, h; @@ -226,7 +226,7 @@ ENTRYPOINT ModeSpecOpt slideshow_opts = {countof(opts), opts, countof(vars), var static const char * blurb (void) { -# ifdef HAVE_COCOA +# ifdef HAVE_JWXYZ return "GLSlideshow"; # else static char buf[255]; @@ -806,19 +806,13 @@ draw_sprite (ModeInfo *mi, sprite *sp) if (do_titles && - img->title && *img->title) + img->title && *img->title && + (sp->state == IN || sp->state == FULL)) { - int x = 10; - int y = mi->xgwa.height - 10; - glColor4f (0, 0, 0, sp->opacity); /* cheap-assed dropshadow */ - print_gl_string (mi->dpy, ss->font_data, - mi->xgwa.width, mi->xgwa.height, x, y, - img->title, False); - x++; y++; glColor4f (1, 1, 1, sp->opacity); - print_gl_string (mi->dpy, ss->font_data, - mi->xgwa.width, mi->xgwa.height, x, y, - img->title, False); + print_texture_label (mi->dpy, ss->font_data, + mi->xgwa.width, mi->xgwa.height, + 1, img->title); } } glPopMatrix(); @@ -873,6 +867,7 @@ draw_sprites (ModeInfo *mi) glPushMatrix(); +/* { GLfloat rot = current_device_rotation(); glTranslatef (0.5, 0.5, 0); @@ -885,6 +880,7 @@ draw_sprites (ModeInfo *mi) } glTranslatef (-0.5, -0.5, 0); } +*/ for (i = 0; i < ss->nsprites; i++) draw_sprite (mi, ss->sprites[i]); @@ -917,6 +913,7 @@ reshape_slideshow (ModeInfo *mi, int width, int height) glViewport (0, 0, width, height); glMatrixMode (GL_PROJECTION); glLoadIdentity(); + glRotatef (current_device_rotation(), 0, 0, 1); glMatrixMode (GL_MODELVIEW); glLoadIdentity(); @@ -999,7 +996,7 @@ sanity_check (ModeInfo *mi) static void check_fps (ModeInfo *mi) { -#ifndef HAVE_COCOA /* always assume Cocoa is fast enough */ +#ifndef HAVE_JWXYZ /* always assume Cocoa and mobile are fast enough */ slideshow_state *ss = &sss[MI_SCREEN(mi)]; @@ -1051,7 +1048,7 @@ check_fps (ModeInfo *mi) /* Need this in case zoom changed. */ reshape_slideshow (mi, mi->xgwa.width, mi->xgwa.height); -#endif /* HAVE_COCOA */ +#endif /* HAVE_JWXYZ */ }