~ubuntu-branches/ubuntu/trusty/libsdl1.2/trusty

« back to all changes in this revision

Viewing changes to src/video/dga/SDL_dgaevents.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2009-12-08 01:50:15 UTC
  • mfrom: (2.1.6 experimental)
  • Revision ID: james.westby@ubuntu.com-20091208015015-mr68dcbbctrhi5at
Tags: 1.2.14-1ubuntu1
* Merge from Debian experimental, remaining changes:
  + debian/control:
    + add libglu1-mesa-dev as a build dependency, so SDL gets built
      with OpenGL support (LP: #328932)
    - dropped build-depends on libarts1-dev, libartsc0-dev. These
      packages will disappear as part of the arts removal
      (LP: #320915)
    - Removed Package: libsdl1.2debian-arts section entirely
    - dropped depends on libsdl1.2debian-arts (= ${binary:Version})
      for libsdl1.2-debian
    - dropped recommends on libartsc0-dev for libsdl1.2-dev
    - Remove svgalib support.
  + debian/rules:
    + set --enable-arts-shared=no and --enable-arts=no in confflags
    - removed --disable-audio-arts from udeb_confflags
    - dropped arts from FLAVOURS=
    + Link using -Wl,-Bsymbolic-functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
    SDL - Simple DirectMedia Layer
3
 
    Copyright (C) 1997-2006 Sam Lantinga
 
3
    Copyright (C) 1997-2009 Sam Lantinga
4
4
 
5
5
    This library is free software; you can redistribute it and/or
6
6
    modify it under the terms of the GNU Lesser General Public
27
27
#include <X11/Xlib.h>
28
28
#include "../Xext/extensions/xf86dga.h"
29
29
 
 
30
#include "SDL_timer.h"
30
31
#include "../SDL_sysvideo.h"
31
32
#include "../../events/SDL_events_c.h"
32
33
#include "SDL_dgavideo.h"
137
138
{
138
139
        /* Keep processing pending events */
139
140
        LOCK_DISPLAY();
 
141
 
 
142
        /* Update activity every five seconds to prevent screensaver. --ryan. */
 
143
        if (!allow_screensaver) {
 
144
                static Uint32 screensaverTicks;
 
145
                Uint32 nowTicks = SDL_GetTicks();
 
146
                if ((nowTicks - screensaverTicks) > 5000) {
 
147
                        XResetScreenSaver(DGA_Display);
 
148
                        screensaverTicks = nowTicks;
 
149
                }
 
150
        }
 
151
 
140
152
        while ( X11_Pending(DGA_Display) ) {
141
153
                DGA_DispatchEvent(this);
142
154
        }
 
155
 
143
156
        UNLOCK_DISPLAY();
144
157
}
145
158