Commit graph

35 commits

Author SHA1 Message Date
Ryan C. Gordon
374ad1d764 From: Tyler Montbriand <tsm@accesscomm.ca>
To: sdl@libsdl.org
Date: Fri, 30 Sep 2005 02:24:50 -0600
Subject: [SDL] WinCE timers, continued

Here's a strange timer for Windows CE that doesn't ignore time across
suspends.  It uses GetSystemTime to keep the time continuous, and GetTicks to
get finer-grained readings than 1 second.  It detects the difference between
the GetTicks time and GetSystemTime time on power-on to keep the error within
one second max.

It's not a patch on the current win32 timer code -- took one look at that and
figured it had more than enough #ifdefs already.  It's windows-ce specific.

Another thing I've noticed is that the Windows CE 4.0 and newer API has
functions warn processes about suspends.  This is something SDL REALLY needs
for audio in particular, because turning it off while it's playing causes
anything that uses audio to hardlock the system on power-on.  Unfortunately I
don't have 4.0 to play with.  :(

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401183
2005-11-22 07:10:07 +00:00
Ryan C. Gordon
071e2180f4 POSIX clock_gettime() isn't available on Linux before 2.6, and the symbol may
just be flat out missing from glibc, so force use of previous gettimeofday()
 behaviour for now.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401161
2005-10-11 20:05:54 +00:00
Ryan C. Gordon
5f4821067f Date: Mon, 10 Oct 2005 13:09:32 +0300
From: Tommi Kyntola <tommi.kyntola@ray.fi>
To: sdl@libsdl.org
Subject: [SDL] [RFC] get_ticks broken on linux

It uses gettimeofday to calculate the timedifference.
Gettimeofday returns current time which is seldom monotonous.
This breaks SDL timer subsystem. (time callbacks and all that
get borked when the time difference ms is suddenly ~ 2^32)

I posted a message about this earlier but got no response.
Some thoughts on this matter would be appreciated.
(Or even an explanation for the lack of interest.)

A patch below would use the posix timers that have been around
since posix 93 and do provide a good source of monotonous time
on linux boxes (and on few others too).

The following patch is also availabe at:
http://www.hut.fi/u/tkyntola/SDL-1.2.9-clockfix.patch

It's against 1.2.9, but I can easily rediffit against
the cvs branch is needed.

cheers,
Tommi Kyntola            tommi.kyntola@ray.fi

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401160
2005-10-11 18:16:12 +00:00
Ryan C. Gordon
cdc4551284 Date: Tue, 11 Oct 2005 16:58:12 +0300 (EEST)
From: =?ISO-8859-1?Q?Martin_Storsj=F6?= <martin@martin.st>
To: sdl@libsdl.org
Subject: [SDL] [PATCH] Use nanosleep on OS X

Hi,

The current version of SDL_Delay on OS X seems to always sleep at least 10
msec. OS X has nanosleep(), which performs shorter sleeps well. The
attached patch makes it use that one instead of select() as currently.

// Martin

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401159
2005-10-11 17:33:03 +00:00
Ryan C. Gordon
17254837b9 From: Jim Paris <jim_jtan_com>
To: sdl@libsdl.org
Date: Sat, 9 Jul 2005 13:59:33 -0400
Subject: [PATCH] fix locking in src/timer/SYS_timer.c

SDL_SetTimer has a typo in CVS.  This code was added since 1.2.8.  The
result is that the SDL_timer_mutex is locked twice and never unlocked,
breaking systems that use a threaded timer implementation.

-jim

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401118
2005-08-17 00:19:45 +00:00
Patrice Mandin
dc6bb60504 Release CPU when waiting
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401046
2005-04-01 15:19:26 +00:00
Sam Lantinga
a0f696ddfa Date: Wed, 26 Jan 2005 13:37:09 GMT
From: Peter Naulls
Subject: RISC OS SDL Patches

Sam, I've attached a diff of the latest changes to libSDL for RISC OS
support.  These changes are by Alan Buckley and myself.

The most significant of these are:

  Optimised assembler blit rountines - I've attached the file
   src/video/riscos/SDL_riscosASM.s which is needed for this.

  Move to using /dev/dsp instead of its own audio implementation.
  This means that src/audio/riscos/SDL_drenderer.c should be removed

  Typo fixes.  Mainly correct spelling of "RISC OS", but some from elsewhere
  too.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401036
2005-02-12 18:01:31 +00:00
Sam Lantinga
37382b468c Fix various problems with the timer code.
* SDL_timer_running wasn't always updated correctly.
* Fixed occasional crash in SDL_SetTimer() when clearing threaded timers
* It was possible to get both the timer thread and event thread running
* Other misc. cleanup

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401029
2005-01-13 23:24:56 +00:00
Sam Lantinga
82fe1ff66f Fix potential use of freed memory in the threaded timer system
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401024
2005-01-04 19:05:32 +00:00
Sam Lantinga
c52f363aaa Date: Fri, 25 Jun 2004 13:29:15 +0100
From: "alan buckley"
Subject: Modification for RISC OS version of SDL

Ive attached a zip file with the changes to this email, it contains the
following:

The file sdldiff.txt is the output from cvs diff u.  .
The directory thread/riscos contains all the new files to support threading.

Readme.riscos is a new readme file to add.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40956
2004-09-17 13:20:10 +00:00
Sam Lantinga
cb9c2efd17 Updated copyright information for 2004 (Happy New Year!)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40770
2004-01-04 16:49:27 +00:00
Sam Lantinga
c1d69dc26c Fixed "dist" make target for newer versions of automake
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40755
2003-12-14 06:25:53 +00:00
Sam Lantinga
e8ce0bc197 Added initial support for RISC OS (thanks Peter Naulls!)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40631
2003-05-29 04:44:13 +00:00
Sam Lantinga
cdde594dbc Updated Atari port for new system headers (thanks Patrice!)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40558
2002-12-07 06:54:47 +00:00
Sam Lantinga
9a5eea0cf3 Fixed building timer code on Windows CE
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40518
2002-10-07 15:19:17 +00:00
Sam Lantinga
3ee2de057f Added initial support for Dreamcast (thanks HERO!)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40510
2002-10-05 16:50:56 +00:00
Sam Lantinga
a3897183c7 Updated for embedded Visual C++ 4.0
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40454
2002-08-20 00:20:06 +00:00
Sam Lantinga
9d7dc6149a Fixed building with pthreads and the pth library
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40416
2002-06-13 21:36:25 +00:00
Sam Lantinga
151ff4a5c6 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40415
2002-06-13 17:52:43 +00:00
Sam Lantinga
6833d2fae9 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40393
2002-06-04 22:30:40 +00:00
Sam Lantinga
3fa7d61105 Disabled QueryPerformanceCounter(), due to problems on Win2K
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40327
2002-03-31 03:34:11 +00:00
Sam Lantinga
fc756544a4 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40318
2002-03-24 01:12:57 +00:00
Sam Lantinga
fa7913f21d Added UNIX RDTSC code by Lompak (disabled by default)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40317
2002-03-23 20:54:17 +00:00
Sam Lantinga
ea5d630479 Updated copyright information for 2002
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40298
2002-03-06 11:23:08 +00:00
Sam Lantinga
89c31763c4 From: Patrice Mandin <pmandin@caramail.com>
Subject: [SDL] [PATCH] Little cleanups for Atari port

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40288
2002-02-27 16:15:34 +00:00
Sam Lantinga
ea01f53e50 Added initial support for Atari (thanks Patrice!)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40282
2002-02-17 19:54:28 +00:00
Sam Lantinga
896c76ea65 Updated Amiga port by Gabriele Greco
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40256
2001-12-16 20:00:27 +00:00
Sam Lantinga
3ceea60069 Updated the source with the correct e-mail address
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40253
2001-12-14 12:38:15 +00:00
Sam Lantinga
ce3a1900be Added initial support for EPOC/Symbian OS (thanks Hannu!)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40174
2001-09-11 20:38:49 +00:00
Sam Lantinga
ee5429fd3e Fixed Solaris nitpicks (thanks Mattias!)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40167
2001-09-04 22:48:09 +00:00
Sam Lantinga
848f5a9b72 Applied Paul Jenner's patches to fix "make distcheck" and "make rpm"
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40139
2001-08-09 05:31:32 +00:00
Sam Lantinga
ec76bd6aef Added Holger Schemel's fix for SDL_GetTicks() on W2K
This adds QueryPerformanceCounter() support, which is probably a good thing.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%4090
2001-07-07 08:03:34 +00:00
Sam Lantinga
df7866c435 Updated the Amiga OS port of SDL (thanks Gabriele)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%4022
2001-05-10 20:13:29 +00:00
Sam Lantinga
9b6cc5a90d Changes since SDL 1.2.0 release
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402
2001-04-26 16:50:19 +00:00
Sam Lantinga
2f110628a7 Initial revision
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401
2001-04-26 16:45:43 +00:00