sdl2_frt/src
Sam Lantinga e663b4eb76 Fixed bug 2423 - timeBeginPeriod & timeEndPeriod mismatch
Coriiander

In src\timer\windows\SDL_systimer.c there is an error with regards to timeBeginPeriod and timeEndPeriod. These functions typically get called when no high resolution timer is available, and GetTickCount is not used.

According to MSDN (link: http://msdn.microsoft.com/en-us/library/windows/desktop/dd757624(v=vs.85).aspx), for every call to timeBeginPeriod a subsequent call to timeEndPeriod is required. While SDL is currently doing this, it fails to call timeEndPeriod when cleaning up/shutting down SDL. Please note that these functions affect things on a system level. Failing to call timeEndPeriod, disables applications for using WINMM-timers after usage&shutdown of SDL, as effectively they the mechanism is now broken.

Solution:
Ensure this code gets called when shutting down the timer subsystem:

#ifndef USE_GETTICKCOUNT
if (!hires_timer_available)
{
    timeSetPeriod(0);
}
#endif
2014-03-01 09:50:52 -08:00
..
atomic Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
audio Fix audio conversion when channel count changes 2014-02-21 13:57:53 +00:00
core Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
cpuinfo Fixed bug 2404 - CPU detection not working with MSVC on x64 2014-02-22 19:10:45 -08:00
dynapi Added the new function at the end so we don't break the ABI 2014-02-13 11:08:12 -08:00
events Fixed bug 2414 - Execute event watchers in the order they were added 2014-02-22 15:27:11 -08:00
file Fixed some compiler warnings from the latest Clang, cleaned up some things. 2014-02-03 14:45:38 -05:00
filesystem Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
haptic Mac: Fix error message for haptic subsystem. 2014-02-25 17:25:49 -08:00
joystick Null termnate the pUserMappings variable to prevent memory corruption. 2014-02-28 16:24:41 -08:00
libm Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
loadso Back out changelist 1951976 2014-02-13 11:05:34 -08:00
main Updated SDL to version 2.0.2 2014-02-09 03:09:56 -08:00
power s/iPhoneOS/iOS 2014-02-17 11:47:54 -05:00
render Improve window recreation logic in OpenGL* renderers 2014-02-27 20:21:46 -03:00
stdlib Thou shalt not use more than 4k local variables in this code. 2014-02-22 10:40:12 -08:00
test Fixed bug 2423 - timeBeginPeriod & timeEndPeriod mismatch 2014-03-01 09:50:52 -08:00
thread Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
timer Fixed bug 2423 - timeBeginPeriod & timeEndPeriod mismatch 2014-03-01 09:50:52 -08:00
video Fixed bug 2423 - timeBeginPeriod & timeEndPeriod mismatch 2014-03-01 09:50:52 -08:00
SDL_assert_c.h Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
SDL_assert.c Added SDL_GetAssertionHandler() and SDL_GetDefaultAssertionHandler(). 2014-02-04 11:38:40 -05:00
SDL_error_c.h Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
SDL_error.c Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
SDL_hints.c Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
SDL_internal.h Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
SDL_log.c Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
SDL.c Fixed bug 2423 - timeBeginPeriod & timeEndPeriod mismatch 2014-03-01 09:50:52 -08:00