Added current_w and current_h to SDL_VideoInfo for SDL 1.2 compatibility
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403324
This commit is contained in:
parent
9719f4078b
commit
1d49195b8c
3 changed files with 6 additions and 0 deletions
|
@ -88,6 +88,9 @@ typedef struct SDL_VideoInfo
|
||||||
Uint32 video_mem;
|
Uint32 video_mem;
|
||||||
|
|
||||||
SDL_PixelFormat *vfmt;
|
SDL_PixelFormat *vfmt;
|
||||||
|
|
||||||
|
int current_w;
|
||||||
|
int current_h;
|
||||||
} SDL_VideoInfo;
|
} SDL_VideoInfo;
|
||||||
|
|
||||||
/* The most common video overlay formats.
|
/* The most common video overlay formats.
|
||||||
|
|
|
@ -76,6 +76,8 @@ SDL_GetVideoInfo(void)
|
||||||
SDL_PixelFormatEnumToMasks(mode.format, &bpp, &Rmask, &Gmask, &Bmask,
|
SDL_PixelFormatEnumToMasks(mode.format, &bpp, &Rmask, &Gmask, &Bmask,
|
||||||
&Amask);
|
&Amask);
|
||||||
info.vfmt = SDL_AllocFormat(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;
|
return &info;
|
||||||
}
|
}
|
||||||
|
|
|
@ -520,6 +520,7 @@ main(int argc, char *argv[])
|
||||||
if (info->blit_fill) {
|
if (info->blit_fill) {
|
||||||
printf("Color fills on hardware surfaces are accelerated\n");
|
printf("Color fills on hardware surfaces are accelerated\n");
|
||||||
}
|
}
|
||||||
|
printf("Current resolution: %dx%d\n", info->current_w, info->current_h);
|
||||||
#if 0
|
#if 0
|
||||||
if (argv[1] && (strcmp(argv[1], "-benchmark") == 0)) {
|
if (argv[1] && (strcmp(argv[1], "-benchmark") == 0)) {
|
||||||
RunVideoTests();
|
RunVideoTests();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue