X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fglslideshow.c;h=d939c97e305347de1777262b3413869d04ec415f;hb=ec8d2b32b63649e6d32bdfb306eda062769af823;hp=be77dc1fef0a66e6af3960e2ff55beadeb1d9adf;hpb=5f9c47ca98dd43d8f59b7c27d3fde6edfde4fe21;p=xscreensaver diff --git a/hacks/glx/glslideshow.c b/hacks/glx/glslideshow.c index be77dc1f..d939c97e 100644 --- a/hacks/glx/glslideshow.c +++ b/hacks/glx/glslideshow.c @@ -358,17 +358,17 @@ image_loaded_cb (const char *filename, XRectangle *geom, img->geom.height *= scale; } -# if 0 /* xscreensaver-getimage returns paths relative to the image directory - now, so leave the sub-directory part in. - */ - if (img->title) /* strip filename to part between last "/" and last ".". */ + /* xscreensaver-getimage returns paths relative to the image directory + now, so leave the sub-directory part in. Unless it's an absolute path. + */ + if (img->title && img->title[0] == '/') { + /* strip filename to part between last "/" and last ".". */ char *s = strrchr (img->title, '/'); if (s) strcpy (img->title, s+1); s = strrchr (img->title, '.'); if (s) *s = 0; } -# endif /* 0 */ if (debug_p) fprintf (stderr, "%s: loaded img %2d: \"%s\"\n", @@ -1214,7 +1214,6 @@ draw_slideshow (ModeInfo *mi) draw_sprites (mi); - ss->fps = fps_compute (mi->fpst, 0); if (mi->fps_p) do_fps (mi); glFinish();