Upgrade to SDL2.0.2 (8393682d9d96d1516831a397290cb34ceb82129f).

This commit is contained in:
rude
2014-03-09 10:15:01 +01:00
parent 6b31c2b45e
commit 2fb789ce68
63 changed files with 1450 additions and 1159 deletions
+19 -1
View File
@@ -421,8 +421,10 @@ int
SDL_VideoInit(const char *driver_name)
{
SDL_VideoDevice *video;
const char *hint;
int index;
int i;
SDL_bool allow_screensaver;
/* Check to make sure we don't overwrite '_this' */
if (_this != NULL) {
@@ -430,7 +432,7 @@ SDL_VideoInit(const char *driver_name)
}
#if !SDL_TIMERS_DISABLED
SDL_InitTicks();
SDL_TicksInit();
#endif
/* Start the event loop */
@@ -504,6 +506,22 @@ SDL_VideoInit(const char *driver_name)
_this->DestroyWindowFramebuffer = SDL_DestroyWindowTexture;
}
/* Disable the screen saver by default. This is a change from <= 2.0.1,
but most things using SDL are games or media players; you wouldn't
want a screensaver to trigger if you're playing exclusively with a
joystick, or passively watching a movie. Things that use SDL but
function more like a normal desktop app should explicitly reenable the
screensaver. */
hint = SDL_GetHint(SDL_HINT_VIDEO_ALLOW_SCREENSAVER);
if (hint) {
allow_screensaver = SDL_atoi(hint) ? SDL_TRUE : SDL_FALSE;
} else {
allow_screensaver = SDL_FALSE;
}
if (!allow_screensaver) {
SDL_DisableScreenSaver();
}
/* If we don't use a screen keyboard, turn on text input by default,
otherwise programs that expect to get text events without enabling
UNICODE input won't get any events.