Windowed width with xscale depends on aspect ratio.

This commit is contained in:
Themaister 2011-04-24 02:44:02 +02:00
parent 3e1e08ca9a
commit d2f2ab6a9d
3 changed files with 5 additions and 2 deletions

View File

@ -337,7 +337,7 @@ void init_video_input(void)
scale = g_extern.filter.scale;
video_info_t video = {
.width = (g_settings.video.fullscreen) ? g_settings.video.fullscreen_x : (296 * g_settings.video.xscale),
.width = (g_settings.video.fullscreen) ? g_settings.video.fullscreen_x : (224 * g_settings.video.xscale * g_settings.video.aspect_ratio),
.height = (g_settings.video.fullscreen) ? g_settings.video.fullscreen_y : (224 * g_settings.video.yscale),
.fullscreen = g_settings.video.fullscreen,
.vsync = g_settings.video.vsync,

View File

@ -219,6 +219,9 @@ static void* sdl_gfx_init(const video_info_t *video, const input_driver_t **inpu
unsigned full_y = video_info->current_h;
SSNES_LOG("Detecting desktop resolution %ux%u.\n", full_x, full_y);
if (!video->fullscreen)
SSNES_LOG("Creating window @ %ux%u\n", video->width, video->height);
vid->screen = SDL_SetVideoMode(video->width, video->height, (g_settings.video.force_16bit || !video->rgb32) ? 15 : 32, SDL_HWSURFACE | SDL_HWACCEL | SDL_DOUBLEBUF | (video->fullscreen ? SDL_FULLSCREEN : 0));
if (!vid->screen && !g_settings.video.force_16bit && !video->rgb32)

View File

@ -5,7 +5,7 @@
#### Video
# Windowed xscale and yscale (Real x res: 296 * xscale, real y scale: 224 * xscale)
# Windowed xscale and yscale (Real x res: 224 * xscale * aspect_ratio, real y scale: 224 * xscale)
# video_xscale = 3.0
# video_yscale = 3.0