[Tux4kids-commits] r536 - tuxmath/trunk/src
tholy-guest at alioth.debian.org
tholy-guest at alioth.debian.org
Thu Jun 19 02:56:28 UTC 2008
Author: tholy-guest
Date: 2008-06-19 02:56:27 +0000 (Thu, 19 Jun 2008)
New Revision: 536
Modified:
tuxmath/trunk/src/setup.c
Log:
Determine the fullscreen resolution by querying the current desktop resolution.
Modified: tuxmath/trunk/src/setup.c
===================================================================
--- tuxmath/trunk/src/setup.c 2008-06-19 01:01:01 UTC (rev 535)
+++ tuxmath/trunk/src/setup.c 2008-06-19 02:56:27 UTC (rev 536)
@@ -510,15 +510,11 @@
tmdprintf("SW mode\n");
}
- //determine the best fullscreen resolution
- int i;
- SDL_Rect** modes = SDL_ListModes(videoInfo->vfmt, SDL_FULLSCREEN | surfaceMode);
- if (modes != (SDL_Rect**)0 && modes != (SDL_Rect**)-1) //if there is a "best" resolution
- {
- fs_res_x = modes[0]->w;
- fs_res_y = modes[0]->h;
- tmdprintf("Optimal resolution is %dx%d\n", fs_res_x, fs_res_y);
- }
+ // Determine the current resolution: this will be used as the
+ // fullscreen resolution, if the user wants fullscreen.
+ tmdprintf("Current resolution: w %d, h %d.\n",videoInfo->current_w,videoInfo->current_h);
+ fs_res_x = videoInfo->current_w;
+ fs_res_y = videoInfo->current_h;
if (Opts_Fullscreen())
{
More information about the Tux4kids-commits
mailing list