~ubuntu-branches/ubuntu/quantal/xscreensaver/quantal

« back to all changes in this revision

Viewing changes to hacks/glx/glslideshow.c

  • Committer: Bazaar Package Importer
  • Author(s): Ted Gould
  • Date: 2008-08-28 16:15:25 UTC
  • mfrom: (1.1.6 upstream) (2.1.3 lenny)
  • Revision ID: james.westby@ubuntu.com-20080828161525-mxga521aoezxjq8h
Tags: 5.07-0ubuntu1
* Upgrade upstream version
* debian/control: Remove suggest xdaliclock as it is no longer
  included
* Remove 10_jwz-screensaver-randr-patch-3.patch as it has been merged
  upstream.
* Add 24_hacks_xsublim_enable.patch as it seems that xsublim was dropped
  from the build files.  There is nothing in the Changelog about it
  so I believe it was accidental.
* Updating the .desktop files from the XML files using gnome-screensaver's
  utility to do so.  Lots of text updates.  Also:
    * Added: abstractile.desktop
    * Added: cwaves.desktop
    * Added: m6502.desktop
    * Added: skytentacles.desktop
    * Removed: xteevee.desktop
* xscreensaver-gl-extra.files: Added skytentacles
* xscreensaver-data-extra.files: Added abstractile, cwaves and m6502
* xscreensaver-data.files: Remove partial abstractile, m6502 and cwaves

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
                  "*showFPS:         False                \n" \
74
74
                  "*fpsSolid:        True                 \n" \
75
75
                  "*useSHM:          True                 \n" \
76
 
                  "*titleFont:       -*-times-bold-r-normal-*-180-*\n" \
 
76
                  "*titleFont:       -*-helvetica-medium-r-normal-*-180-*\n" \
77
77
                  "*desktopGrabber:  xscreensaver-getimage -no-desktop %s\n" \
78
78
                  "*grabDesktopImages:   False \n" \
79
79
                  "*chooseRandomImages:  True  \n"
531
531
      sp->from = swap;
532
532
    }
533
533
 
534
 
  /* Make sure the aspect ratios are within 0.0001 of each other.
 
534
  /* Make sure the aspect ratios are within 0.001 of each other.
535
535
   */
536
 
  if ((int) (0.5 + (sp->from.w * 1000 / sp->from.h)) !=
537
 
      (int) (0.5 + (sp->to.w   * 1000 / sp->to.h)))
538
 
    {
539
 
      fprintf (stderr, "%s: botched aspect: %f x %f vs  %f x %f: %s\n",
540
 
               progname, sp->from.w, sp->from.h, sp->to.w, sp->to.h,
541
 
               sp->img->title);
542
 
      abort();
543
 
    }
 
536
  {
 
537
    int r1 = 0.5 + (sp->from.w * 1000 / sp->from.h);
 
538
    int r2 = 0.5 + (sp->to.w   * 1000 / sp->to.h);
 
539
    if (r1 < r2-1 || r1 > r2+1)
 
540
      {
 
541
        fprintf (stderr,
 
542
                 "%s: botched aspect: %f x %f (%d) vs  %f x %f (%d): %s\n",
 
543
                 progname, 
 
544
                 sp->from.w, sp->from.h, r1,
 
545
                 sp->to.w, sp->to.h, r2,
 
546
                 (sp->img->title ? sp->img->title : "[null]"));
 
547
        abort();
 
548
      }
 
549
  }
544
550
 
545
551
  sp->from.x /= vp_w;
546
552
  sp->from.y /= vp_h;
810
816
        glColor4f (0, 0, 0, sp->opacity);   /* cheap-assed dropshadow */
811
817
        print_gl_string (mi->dpy, ss->xfont, ss->font_dlist,
812
818
                         mi->xgwa.width, mi->xgwa.height, x, y,
813
 
                         img->title);
 
819
                         img->title, False);
814
820
        x++; y++;
815
821
        glColor4f (1, 1, 1, sp->opacity);
816
822
        print_gl_string (mi->dpy, ss->xfont, ss->font_dlist,
817
823
                         mi->xgwa.width, mi->xgwa.height, x, y,
818
 
                         img->title);
 
824
                         img->title, False);
819
825
      }
820
826
  }
821
827
  glPopMatrix();
1210
1216
 
1211
1217
  draw_sprites (mi);
1212
1218
 
1213
 
  ss->fps = fps_1 (mi);
1214
 
  if (mi->fps_p) fps_2 (mi);
 
1219
  ss->fps = fps_compute (mi->fpst, 0);
 
1220
  if (mi->fps_p) do_fps (mi);
1215
1221
 
1216
1222
  glFinish();
1217
1223
  glXSwapBuffers (MI_DISPLAY (mi), MI_WINDOW(mi));