Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.3
xscreensaver
xscreensaver-slideshow-dri-detect.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xscreensaver-slideshow-dri-detect.patch of Package xscreensaver
Index: hacks/glx/glslideshow.c =================================================================== --- hacks/glx/glslideshow.c.orig 2011-09-28 22:34:41.000000000 +0200 +++ hacks/glx/glslideshow.c 2012-02-20 20:20:41.130046097 +0100 @@ -994,6 +994,29 @@ sanity_check (ModeInfo *mi) else if (fps_cutoff > 30) fps_cutoff = 30; } +static void +low_fps_mode(ModeInfo *mi) +{ + int i; + slideshow_state *ss = &sss[MI_SCREEN(mi)]; + + zoom = 100; + fade_seconds = 0; + + sanity_check (mi); + + for (i = 0; i < ss->nsprites; i++) + { + sprite *sp = ss->sprites[i]; + randomize_sprite (mi, sp); + sp->state = FULL; + } + + ss->redisplay_needed_p = True; + + /* Need this in case zoom changed. */ + reshape_slideshow (mi, mi->xgwa.width, mi->xgwa.height); +} static void check_fps (ModeInfo *mi) @@ -1003,7 +1026,6 @@ check_fps (ModeInfo *mi) slideshow_state *ss = &sss[MI_SCREEN(mi)]; double start_time, end_time, wall_elapsed, frame_duration, fps; - int i; start_time = ss->now; end_time = double_time(); @@ -1034,22 +1056,7 @@ check_fps (ModeInfo *mi) fprintf (stderr, "%s: only %.1f fps! Turning off pan/fade to compensate...\n", blurb(), fps); - zoom = 100; - fade_seconds = 0; - - sanity_check (mi); - - for (i = 0; i < ss->nsprites; i++) - { - sprite *sp = ss->sprites[i]; - randomize_sprite (mi, sp); - sp->state = FULL; - } - - ss->redisplay_needed_p = True; - - /* Need this in case zoom changed. */ - reshape_slideshow (mi, mi->xgwa.width, mi->xgwa.height); + low_fps_mode (mi); #endif /* HAVE_COCOA */ } @@ -1089,7 +1096,13 @@ init_slideshow (ModeInfo *mi) ss = &sss[screen]; if ((ss->glx_context = init_GL(mi)) != NULL) { - reshape_slideshow (mi, MI_WIDTH(mi), MI_HEIGHT(mi)); + + if (glXIsDirect (MI_DISPLAY(mi), *ss->glx_context) == True) { + reshape_slideshow (mi, MI_WIDTH(mi), MI_HEIGHT(mi)); + } else { + low_fps_mode (mi); + } + } else { MI_CLEARWINDOW(mi); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor