X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fphotopile.c;h=e060f25b11fe6bf5d0b0a3fe58d0ba8dd6e59706;hb=78add6e627ee5f10e1fa6f3852602ea5066eee5a;hp=847b3b2926dd149b697e23c4ec16bf35306ccbcf;hpb=d6b0217f2417bd19187f0ebc389d6c5c2233b11c;p=xscreensaver diff --git a/hacks/glx/photopile.c b/hacks/glx/photopile.c index 847b3b29..e060f25b 100644 --- a/hacks/glx/photopile.c +++ b/hacks/glx/photopile.c @@ -1,4 +1,4 @@ -/* photopile, Copyright (c) 2008-2015 Jens Kilian +/* photopile, Copyright (c) 2008-2018 Jens Kilian * Based on carousel, Copyright (c) 2005-2008 Jamie Zawinski * Loads a sequence of images and shuffles them into a pile. * @@ -13,8 +13,10 @@ #if defined(HAVE_COCOA) || defined(HAVE_ANDROID) # define DEF_FONT "OCR A Std 48, Lucida Console 48, Monaco 48" -#else +#elif 0 /* real X11, XQueryFont() */ # define DEF_FONT "-*-helvetica-bold-r-normal-*-*-480-*-*-*-*-*-*" +#else /* real X11, load_font_retry() */ +# define DEF_FONT "-*-ocr a std-medium-r-*-*-*-480-*-*-m-*-*-*" #endif #define DEFAULTS "*count: 7 \n" \ @@ -29,9 +31,9 @@ "*chooseRandomImages: True \n" \ "*suppressRotationAnimation: True\n" \ -# define refresh_photopile 0 +# define free_photopile 0 # define release_photopile 0 -# define photopile_handle_event 0 +# define photopile_handle_event xlockmore_no_events #undef countof #define countof(x) (sizeof((x))/sizeof((*x))) @@ -480,11 +482,7 @@ init_photopile (ModeInfo *mi) photopile_state *ss; int wire = MI_IS_WIREFRAME(mi); - if (sss == NULL) { - if ((sss = (photopile_state *) - calloc (MI_NUM_SCREENS(mi), sizeof(photopile_state))) == NULL) - return; - } + MI_INIT (mi, sss); ss = &sss[screen]; ss->mi = mi; @@ -666,6 +664,7 @@ draw_image (ModeInfo *mi, int i, GLfloat t, GLfloat s, GLfloat z) # if defined(HAVE_COCOA) scale /= 2; + if (MI_WIDTH(mi) > 2560) scale /= 2; /* Retina displays */ # endif # if defined(HAVE_MOBILE)