--- a/include/SDL_compat.h Wed Dec 10 08:39:00 2008 +0000
+++ b/include/SDL_compat.h Fri Dec 12 06:46:20 2008 +0000
@@ -88,6 +88,9 @@
Uint32 video_mem;
SDL_PixelFormat *vfmt;
+
+ int current_w;
+ int current_h;
} SDL_VideoInfo;
/* The most common video overlay formats.
--- a/src/SDL_compat.c Wed Dec 10 08:39:00 2008 +0000
+++ b/src/SDL_compat.c Fri Dec 12 06:46:20 2008 +0000
@@ -76,6 +76,8 @@
SDL_PixelFormatEnumToMasks(mode.format, &bpp, &Rmask, &Gmask, &Bmask,
&Amask);
info.vfmt = SDL_AllocFormat(bpp, Rmask, Gmask, Bmask, Amask);
+ info.current_w = mode.w;
+ info.current_h = mode.h;
}
return &info;
}
--- a/test/testvidinfo.c Wed Dec 10 08:39:00 2008 +0000
+++ b/test/testvidinfo.c Fri Dec 12 06:46:20 2008 +0000
@@ -520,6 +520,7 @@
if (info->blit_fill) {
printf("Color fills on hardware surfaces are accelerated\n");
}
+ printf("Current resolution: %dx%d\n", info->current_w, info->current_h);
#if 0
if (argv[1] && (strcmp(argv[1], "-benchmark") == 0)) {
RunVideoTests();