From d2f2ab6a9d08a0b2782e46d96f8fc724fc651bb7 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 24 Apr 2011 02:44:02 +0200 Subject: [PATCH] Windowed width with xscale depends on aspect ratio. --- driver.c | 2 +- gfx/sdl.c | 3 +++ ssnes.cfg | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/driver.c b/driver.c index 70e8807d15..1235348ab5 100644 --- a/driver.c +++ b/driver.c @@ -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, diff --git a/gfx/sdl.c b/gfx/sdl.c index 06dbe7c1ff..d69f0b8419 100644 --- a/gfx/sdl.c +++ b/gfx/sdl.c @@ -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) diff --git a/ssnes.cfg b/ssnes.cfg index 7563c70732..0ff34be814 100644 --- a/ssnes.cfg +++ b/ssnes.cfg @@ -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