| 525 | } |
| 526 | |
| 527 | static Config::Resolution getDisplayResolutionByMode(Config::ScreenMode mode) |
| 528 | { |
| 529 | auto& config = Config::get(); |
| 530 | if (mode == Config::ScreenMode::window) |
| 531 | { |
| 532 | if (config.display.windowResolution.isPositive()) |
| 533 | { |
| 534 | return getSaneWindowedResolution(config.display.index, config.display.windowResolution); |
| 535 | } |
| 536 | else |
| 537 | { |
| 538 | return getSaneWindowedResolution(config.display.index, { 800, 600 }); |
| 539 | } |
| 540 | } |
| 541 | else if (mode == Config::ScreenMode::fullscreen && config.display.fullscreenResolution.isPositive()) |
| 542 | { |
| 543 | return config.display.fullscreenResolution; |
| 544 | } |
| 545 | else |
| 546 | { |
| 547 | return getDesktopResolution(); |
| 548 | } |
| 549 | } |
| 550 | |
| 551 | Config::Resolution getResolution() |
| 552 | { |
no test coverage detected