Previous 199869 Revisions Next

r31886 Wednesday 3rd September, 2014 at 02:26:15 UTC by R. Belmont
SDL: Use the same screen selection method for SDL2 as Windows. [R. Belmont]
[src/osd/sdl]video.c

trunk/src/osd/sdl/video.c
r31885r31886
487487static sdl_monitor_info *pick_monitor(sdl_options &options, int index)
488488{
489489   sdl_monitor_info *monitor;
490   const char *scrname;
490   const char *scrname, *scrname2;
491491   int moncount = 0;
492492   float aspect;
493493
494494   // get the screen option
495   scrname = options.screen(index);
495   scrname = options.screen();
496   scrname2 = options.screen(index);
496497
498   // decide which one we want to use
499   if (strcmp(scrname2, "auto") != 0)
500      scrname = scrname2;
501
497502   // get the aspect ratio
498503   aspect = get_aspect(options.aspect(), options.aspect(index), TRUE);
499504
500505   // look for a match in the name first
501506   if (scrname != NULL)
507   {
502508      for (monitor = sdl_monitor_list; monitor != NULL; monitor = monitor->next)
503509      {
504510         moncount++;
505511         if (strcmp(scrname, monitor->monitor_device) == 0)
506512            goto finishit;
507513      }
514   }
508515
509516   // didn't find it; alternate monitors until we hit the jackpot
510517   index %= moncount;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team