mirror of
https://github.com/holub/mame
synced 2025-07-05 18:08:04 +03:00
SDL: Use the same screen selection method for SDL2 as Windows. [R. Belmont]
This commit is contained in:
parent
075268f0fd
commit
61f8d45d62
@ -487,24 +487,31 @@ static void init_monitors(void)
|
||||
static sdl_monitor_info *pick_monitor(sdl_options &options, int index)
|
||||
{
|
||||
sdl_monitor_info *monitor;
|
||||
const char *scrname;
|
||||
const char *scrname, *scrname2;
|
||||
int moncount = 0;
|
||||
float aspect;
|
||||
|
||||
// get the screen option
|
||||
scrname = options.screen(index);
|
||||
scrname = options.screen();
|
||||
scrname2 = options.screen(index);
|
||||
|
||||
// decide which one we want to use
|
||||
if (strcmp(scrname2, "auto") != 0)
|
||||
scrname = scrname2;
|
||||
|
||||
// get the aspect ratio
|
||||
aspect = get_aspect(options.aspect(), options.aspect(index), TRUE);
|
||||
|
||||
// look for a match in the name first
|
||||
if (scrname != NULL)
|
||||
{
|
||||
for (monitor = sdl_monitor_list; monitor != NULL; monitor = monitor->next)
|
||||
{
|
||||
moncount++;
|
||||
if (strcmp(scrname, monitor->monitor_device) == 0)
|
||||
goto finishit;
|
||||
}
|
||||
}
|
||||
|
||||
// didn't find it; alternate monitors until we hit the jackpot
|
||||
index %= moncount;
|
||||
|
Loading…
Reference in New Issue
Block a user