sdl2_frt/src/test
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
..
SDL_test_assert.c Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
SDL_test_common.c Fixed bug 2423 - timeBeginPeriod & timeEndPeriod mismatch 2014-03-01 09:50:52 -08:00
SDL_test_compare.c Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
SDL_test_crc32.c Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
SDL_test_font.c Exposed the font character size and SDLTest_DrawCharacter() to make it easier to do custom debug text layout 2014-02-10 10:02:42 -08:00
SDL_test_fuzzer.c Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
SDL_test_harness.c Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
SDL_test_imageBlit.c Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
SDL_test_imageBlitBlend.c Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
SDL_test_imageFace.c Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
SDL_test_imagePrimitives.c Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
SDL_test_imagePrimitivesBlend.c Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
SDL_test_log.c Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
SDL_test_md5.c Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
SDL_test_random.c Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00