summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2015-04-26 07:31:43 +1000
committer Vas Crabb <vas@vastheman.com>2015-04-26 07:31:43 +1000
commitc25f6d922d00b41a2220d39794e86a632911d82b (patch)
tree34406469a7406159c5ff957dd888375f9953be05
parent90398cfd00d3e84931f8cc4fceb303c2898a75fb (diff)
SDLMAME v0.160 selects the first mode unconditionally as a best mode when -switchres is used on SDL12 [KO Myng-Hun]
-rw-r--r--src/osd/sdl/window.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/osd/sdl/window.c b/src/osd/sdl/window.c
index ffd7874c64d..c73ded1690c 100644
--- a/src/osd/sdl/window.c
+++ b/src/osd/sdl/window.c
@@ -929,6 +929,7 @@ osd_dim sdl_window_info::pick_best_mode()
int minimum_width, minimum_height, target_width, target_height;
int i;
float size_score, best_score = 0.0f;
+ int best_width = 0, best_height = 0;
SDL_Rect **modes;
// determine the minimum width/height for the selected target
@@ -989,12 +990,13 @@ osd_dim sdl_window_info::pick_best_mode()
if (size_score > best_score)
{
best_score = size_score;
- return osd_dim(modes[i]->w, modes[i]->h);
+ best_width = modes[i]->w;
+ best_height = modes[i]->h;
}
}
}
- return osd_dim(0,0);
+ return osd_dim(best_width, best_height);
}
#endif