X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fphotopile.c;h=b4c98d0eb8d932f73bb1150f7c75b75c37e3ae71;hp=7e6faef93b381234995c1bf03f6f5a8acd6def92;hb=f0261d8acab611f3433160e4f07367b870439739;hpb=7b34ef992563d7bcbb64cc5597dc45fa24470b05 diff --git a/hacks/glx/photopile.c b/hacks/glx/photopile.c index 7e6faef9..b4c98d0e 100644 --- a/hacks/glx/photopile.c +++ b/hacks/glx/photopile.c @@ -296,11 +296,12 @@ load_image (ModeInfo *mi) image_loaded_cb (0, 0, 0, 0, 0, 0, ss); else { - int w = (int)(MI_WIDTH(mi) * scale) - 1; - int h = (int)(MI_HEIGHT(mi) * scale) - 1; - if (w <= 10) w = 10; - if (h <= 10) h = 10; - load_texture_async (mi->xgwa.screen, mi->window, *ss->glx_context, w, h, + int w = MI_WIDTH(mi); + int h = MI_HEIGHT(mi); + int size = (int)((w > h ? w : h) * scale); + if (size <= 10) size = 10; + load_texture_async (mi->xgwa.screen, mi->window, *ss->glx_context, + size, size, mipmap_p, frame->texid, image_loaded_cb, ss); }