diff test/testvidinfo.c @ 1545:8d9bb0cf2c2a

Added current_w and current_h to the SDL_VideoInfo structure, which is set to the desktop resolution during video intialization, and then set to the current resolution when a video mode is set. SDL_SetVideoMode() now accepts 0 for width or height and will use the current video mode (or the desktop mode if no mode has been set.)
author Sam Lantinga <slouken@libsdl.org>
date Wed, 15 Mar 2006 17:46:41 +0000
parents 05c551e5bc64
children 8b9d79e7eacf c121d94672cb
line wrap: on
line diff
--- a/test/testvidinfo.c	Wed Mar 15 15:47:49 2006 +0000
+++ b/test/testvidinfo.c	Wed Mar 15 17:46:41 2006 +0000
@@ -400,7 +400,8 @@
 	}
 	info = SDL_GetVideoInfo();
 	printf(
-"Current display: %d bits-per-pixel\n",info->vfmt->BitsPerPixel);
+"Current display: %dx%d, %d bits-per-pixel\n",
+		info->current_w, info->current_h, info->vfmt->BitsPerPixel);
 	if ( info->vfmt->palette == NULL ) {
 		printf("	Red Mask = 0x%.8x\n", info->vfmt->Rmask);
 		printf("	Green Mask = 0x%.8x\n", info->vfmt->Gmask);