trunk/src/osd/sdl/video.c
| r31885 | r31886 | |
| 487 | 487 | static sdl_monitor_info *pick_monitor(sdl_options &options, int index) |
| 488 | 488 | { |
| 489 | 489 | sdl_monitor_info *monitor; |
| 490 | | const char *scrname; |
| 490 | const char *scrname, *scrname2; |
| 491 | 491 | int moncount = 0; |
| 492 | 492 | float aspect; |
| 493 | 493 | |
| 494 | 494 | // get the screen option |
| 495 | | scrname = options.screen(index); |
| 495 | scrname = options.screen(); |
| 496 | scrname2 = options.screen(index); |
| 496 | 497 | |
| 498 | // decide which one we want to use |
| 499 | if (strcmp(scrname2, "auto") != 0) |
| 500 | scrname = scrname2; |
| 501 | |
| 497 | 502 | // get the aspect ratio |
| 498 | 503 | aspect = get_aspect(options.aspect(), options.aspect(index), TRUE); |
| 499 | 504 | |
| 500 | 505 | // look for a match in the name first |
| 501 | 506 | if (scrname != NULL) |
| 507 | { |
| 502 | 508 | for (monitor = sdl_monitor_list; monitor != NULL; monitor = monitor->next) |
| 503 | 509 | { |
| 504 | 510 | moncount++; |
| 505 | 511 | if (strcmp(scrname, monitor->monitor_device) == 0) |
| 506 | 512 | goto finishit; |
| 507 | 513 | } |
| 514 | } |
| 508 | 515 | |
| 509 | 516 | // didn't find it; alternate monitors until we hit the jackpot |
| 510 | 517 | index %= moncount; |