| 77 | } |
| 78 | |
| 79 | Game_ConfigVideo BaseUi::GetConfig() const { |
| 80 | Game_ConfigVideo cfg = vcfg; |
| 81 | |
| 82 | cfg.Hide(); |
| 83 | |
| 84 | vGetConfig(cfg); |
| 85 | |
| 86 | Rect metrics = GetWindowMetrics(); |
| 87 | cfg.window_x.Set(metrics.x); |
| 88 | cfg.window_y.Set(metrics.y); |
| 89 | cfg.window_width.Set(metrics.width); |
| 90 | cfg.window_height.Set(metrics.height); |
| 91 | |
| 92 | if (!cfg.fullscreen.IsOptionVisible()) { |
| 93 | cfg.fps.RemoveFromValidSet(ConfigEnum::ShowFps::Overlay); |
| 94 | } |
| 95 | |
| 96 | if (cfg.vsync.IsOptionVisible() |
| 97 | && cfg.vsync.Get()) { |
| 98 | cfg.fps_limit.SetLocked(true); |
| 99 | cfg.fps_limit.SetDescription("This option requires V-Sync to be disabled"); |
| 100 | } |
| 101 | |
| 102 | if (cfg.fullscreen.IsOptionVisible() |
| 103 | && cfg.fullscreen.Get()) { |
| 104 | cfg.window_zoom.SetLocked(true); |
| 105 | cfg.window_zoom.SetDescription("This option requires to be in windowed mode"); |
| 106 | } |
| 107 | |
| 108 | if (Player::has_custom_resolution) { |
| 109 | cfg.game_resolution.SetLocked(true); |
| 110 | cfg.game_resolution.SetDescription("This game uses a custom resolution"); |
| 111 | } |
| 112 | |
| 113 | return cfg; |
| 114 | } |
| 115 | |
| 116 | bool BaseUi::ChangeDisplaySurfaceResolution(int new_width, int new_height) { |
| 117 | if (new_width == current_display_mode.width && new_height == current_display_mode.height) { |
nothing calls this directly
no test coverage detected