From: Holger Schemel Date: Wed, 7 Mar 2007 09:17:55 +0000 (+0100) Subject: rnd-20070307-1-src X-Git-Tag: 3.2.4^2~77 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=1e491a9ddfe4c4098a252b2703bd35f724eb397c;p=rocksndiamonds.git rnd-20070307-1-src * added option "system.sdl_videodriver" to select SDL video driver * added output of SDL video and audio driver to "version info" page * added group element drawing to IntelliDraw drawing functions * fixed animation resetting problem again (last try broke Snake Bite) * fixed diagonal scrolling in screen scrolling (last try broke Pac Man) --- diff --git a/ChangeLog b/ChangeLog index 51a8c9ff..5c479e15 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-03-07 + * added option "system.sdl_videodriver" to select SDL video driver + * added output of SDL video and audio driver to "version info" page + +2007-03-06 + * added group element drawing to IntelliDraw drawing functions + * fixed animation resetting problem again (last try broke Snake Bite) + * fixed diagonal scrolling in screen scrolling (last try broke Pac Man) + 2007-03-01 * added new (special) "include: " directive that works in all configuration files (like "graphicsinfo.conf") and that has the same diff --git a/src/conftime.h b/src/conftime.h index c39bf070..b00a6acb 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2007-03-06 02:28" +#define COMPILE_DATE_STRING "2007-03-07 10:13" diff --git a/src/files.c b/src/files.c index 60782f76..d1a6eec4 100644 --- a/src/files.c +++ b/src/files.c @@ -7774,10 +7774,11 @@ void SaveScore(int nr) #define NUM_PLAYER_SETUP_TOKENS 16 /* system setup */ -#define SETUP_TOKEN_SYSTEM_SDL_AUDIODRIVER 0 -#define SETUP_TOKEN_SYSTEM_AUDIO_FRAGMENT_SIZE 1 +#define SETUP_TOKEN_SYSTEM_SDL_VIDEODRIVER 0 +#define SETUP_TOKEN_SYSTEM_SDL_AUDIODRIVER 1 +#define SETUP_TOKEN_SYSTEM_AUDIO_FRAGMENT_SIZE 2 -#define NUM_SYSTEM_SETUP_TOKENS 2 +#define NUM_SYSTEM_SETUP_TOKENS 3 /* options setup */ #define SETUP_TOKEN_OPTIONS_VERBOSE 0 @@ -7917,6 +7918,7 @@ static struct TokenInfo player_setup_tokens[] = static struct TokenInfo system_setup_tokens[] = { + { TYPE_STRING, &syi.sdl_videodriver, "system.sdl_videodriver" }, { TYPE_STRING, &syi.sdl_audiodriver, "system.sdl_audiodriver" }, { TYPE_INTEGER, &syi.audio_fragment_size,"system.audio_fragment_size" }, }; @@ -8028,6 +8030,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si) si->input[i].key.drop = (i == 0 ? DEFAULT_KEY_DROP : KSYM_UNDEFINED); } + si->system.sdl_videodriver = getStringCopy(ARG_DEFAULT); si->system.sdl_audiodriver = getStringCopy(ARG_DEFAULT); si->system.audio_fragment_size = DEFAULT_AUDIO_FRAGMENT_SIZE; diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index 6ac1229f..f3f57567 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -94,6 +94,9 @@ static void SDLSetWindowIcon(char *basename) void SDLInitVideoDisplay(void) { + if (!strEqual(setup.system.sdl_videodriver, ARG_DEFAULT)) + putenv(getStringCat2("SDL_VIDEODRIVER=", setup.system.sdl_videodriver)); + putenv("SDL_VIDEO_CENTERED=1"); /* initialize SDL video */ diff --git a/src/libgame/system.h b/src/libgame/system.h index 0a1c3906..b3811e61 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -773,6 +773,7 @@ struct SetupShortcutInfo struct SetupSystemInfo { + char *sdl_videodriver; char *sdl_audiodriver; int audio_fragment_size; }; diff --git a/src/screens.c b/src/screens.c index 6d3bd170..d37a3f14 100644 --- a/src/screens.c +++ b/src/screens.c @@ -2841,11 +2841,13 @@ void DrawInfoScreen_Version() int ystart2 = mSY - SY + 150; int ybottom = mSY - SY + SYSIZE - 20; int xstart1 = mSX + 2 * xstep; - int xstart2 = mSX + 18 * xstep; + int xstart2 = mSX + 19 * xstep; #if defined(TARGET_SDL) - int xstart3 = mSX + 28 * xstep; + int xstart3 = mSX + 29 * xstep; SDL_version sdl_version_compiled; const SDL_version *sdl_version_linked; + int driver_name_len = 8; + char driver_name[driver_name_len]; #endif SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_VERSION); @@ -2937,6 +2939,25 @@ void DrawInfoScreen_Version() sdl_version_linked->major, sdl_version_linked->minor, sdl_version_linked->patch); + + ystart2 += 3 * ystep; + DrawTextF(xstart1, ystart2, font_header, "Driver"); + DrawTextF(xstart2, ystart2, font_header, "Requested"); + DrawTextF(xstart3, ystart2, font_header, "Active"); + + SDL_VideoDriverName(driver_name, driver_name_len); + + ystart2 += 2 * ystep; + DrawTextF(xstart1, ystart2, font_text, "SDL_VideoDriver"); + DrawTextF(xstart2, ystart2, font_text, "%s", setup.system.sdl_videodriver); + DrawTextF(xstart3, ystart2, font_text, "%s", driver_name); + + SDL_AudioDriverName(driver_name, driver_name_len); + + ystart2 += ystep; + DrawTextF(xstart1, ystart2, font_text, "SDL_AudioDriver"); + DrawTextF(xstart2, ystart2, font_text, "%s", setup.system.sdl_audiodriver); + DrawTextF(xstart3, ystart2, font_text, "%s", driver_name); #endif DrawTextSCentered(ybottom, FONT_TEXT_4,