X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Flament.c;h=77cf156bdc1b060cf5c37cfab6e786e9f9b14815;hb=dba664f31aa87285db4d76cf8c5e66335299703a;hp=ab4bf83e1109ca7d472c34538b13459a8202f401;hpb=6f5482d73adb0165c0130bb47d852644ab0c4869;p=xscreensaver diff --git a/hacks/glx/lament.c b/hacks/glx/lament.c index ab4bf83e..77cf156b 100644 --- a/hacks/glx/lament.c +++ b/hacks/glx/lament.c @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1998-2012 Jamie Zawinski +/* xscreensaver, Copyright (c) 1998-2014 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -90,6 +90,12 @@ ENTRYPOINT ModeSpecOpt lament_opts = {countof(opts), opts, countof(vars), vars, #include "xpm-ximage.h" #include "rotator.h" #include "gltrackball.h" + +#ifdef __GNUC__ + __extension__ /* don't warn about "string length is greater than the length + ISO C89 compilers are required to support" when including + the following XPM file... */ +#endif #if 0 # include "../images/lament128.xpm" #else @@ -1378,7 +1384,11 @@ static void scale_for_window(ModeInfo *mi) { lament_configuration *lc = &lcs[MI_SCREEN(mi)]; - int target_size = lc->texture->width * 1.4; + + /* No texture created in -wireframe or -no-texture, so guess. */ + int target_size = (lc->texture + ? lc->texture->width * 1.4 + : 340); int win_size = (MI_WIDTH(mi) > MI_HEIGHT(mi) ? MI_HEIGHT(mi) : MI_WIDTH(mi)); /* This scale makes the box take up most of the window */