Commit Graph

18 Commits (dd81dad1ad407390d55cc818f64552e523c459b5)

Author SHA1 Message Date
Sam Lantinga 1367bf8748 Integrated David Ludwig's support for Windows RT 2014-03-09 11:36:47 -07:00
Sam Lantinga 05c23063bb Fixed line endings on WinRT source code 2014-03-09 11:06:11 -07:00
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
Sam Lantinga 58edac3e69 Fixed bug 2374 - Update copyright for 2014...
Is it that time already??
2014-02-02 00:53:27 -08:00
Ryan C. Gordon 090327e76e Implemented the Dynamic API magic. 2013-12-09 16:03:18 -05:00
David Ludwig 46740a5a1c WinRT: merged with latest SDL 2.x/HG code
SDL 2.x recently accepted patches to enable OpenGL ES 2 support via Google's ANGLE library.  The thought is to try to eventually merge SDL/WinRT's OpenGL code with SDL-official's.
2013-11-28 22:09:21 -05:00
Ryan C. Gordon 7e1289af32 Make internal SDL sources include SDL_internal.h instead of SDL_config.h
The new header will include SDL_config.h, but allows for other global stuff.
2013-11-24 23:56:17 -05:00
Gabriel Jacobo f848adff5f Improve Android pause/resume behavior. 2013-11-29 10:06:08 -03:00
Ryan C. Gordon 00003e8c00 Renamed things named after BeOS to be named after Haiku instead. 2013-11-14 11:51:24 -05:00
David Ludwig 69c5d21d7d WinRT: merged with SDL 2.0.1 codebase 2013-10-27 21:26:46 -04:00
David Ludwig d41fdc94d6 WinRT: build fixes and additional WinRT-related integrations with SDL 2.0.0 2013-08-13 20:09:52 -04:00
Sam Lantinga 1ad936eb29 Fixed bug 2027 - Full-screen appears to be broken - hang in SDL_DestroyWindow()
Rainer Deyke

I'm running Linux Mint 15 with the Cinnamon window manager.  SDL_DestroyWindow consistently locks up for me when the window if fullscreen.
2013-08-11 19:56:43 -07:00
Gabriel Jacobo eec4710c53 Fixes bug #2074 - Thanks Sylvain!
SDL_syssem.c:159 comparison of unsigned expression >= 0 is always true
Solved by comparing unsigneds directly

SDL_systimer.c:164: warning: control may reach end of Compile
Solved by returning the default value if all else fails.

SDL_androidgl.c:41:1: warning: type specifier missing, defaults to 'int'
SDL_androidgl.c:47:1: warning: control reaches end of non-void function
Solved by adding void return type to the function implementation
2013-08-29 14:03:44 -03:00
Gabriel Jacobo 2490166d2d Fixes for -Wdeclaration-after-statement 2013-08-21 10:12:16 -03:00
Ryan C. Gordon 7e3b7dbcb6 Patched to compile with Visual Studio. 2013-08-17 20:46:34 -04:00
Sam Lantinga d7817f424b Fixed for consistency with the other platforms 2013-08-17 17:04:14 -07:00
Edward Rudd e187810eca auto init the ticks if the GetTicks and the like methods are called before SDL_Init().. This prevents annoying game bugs such as caching SDL_GetPerformanceFrequency in a static initializer 2013-08-17 18:07:29 -04:00
Gabriel Jacobo dad420670f Fixes #2022, do not resume on Android when surfaceChanged
If the app is in landscape mode and the user presses the power button, a pause
is followed immediately by a surfaceChanged event because the lock screen
is shown in portrait mode. This triggers a "false" resume.
So, we just pause and resume following the onWindowFocusChanged events.

Also, wait for SDL_APP_WILLENTERBACKGROUND and SDL_APP_DIDENTERBACKGROUND before
blocking the event pump.
2013-08-12 11:13:50 -03:00