diff --git a/crates/horizon-client/src/settings.rs b/crates/horizon-client/src/settings.rs index d232b8dd2..5e25e9679 100644 --- a/crates/horizon-client/src/settings.rs +++ b/crates/horizon-client/src/settings.rs @@ -194,8 +194,9 @@ impl Default for Settings { gui_scale: 0, view_bobbing: true, gamma: 0.5, - // Vanilla defaults to 120; Horizon runs unlimited unless capped. - max_fps: 260, + // Vanilla's default, as for an options.txt without the key: a + // capped frame rate leaves the cores idle when VSync is off. + max_fps: 120, vsync: true, fullscreen: false, smooth_lighting: true, @@ -608,6 +609,16 @@ mod tests { assert_eq!(again.keys.get("key.jump"), "key.keyboard.j"); } #[test] + fn no_options_txt_paces_frames_like_an_empty_one() { + let (fresh, empty) = (Settings::default(), Settings::parse("")); + assert_eq!(fresh.max_fps, 120); + assert_eq!(fresh.max_fps, empty.max_fps); + assert_eq!(fresh.vsync, empty.vsync); + assert_eq!(fresh.inactivity_fps_limit, empty.inactivity_fps_limit); + assert_eq!(fresh.render_distance, empty.render_distance); + assert_eq!(fresh.simulation_distance, empty.simulation_distance); + } + #[test] fn subtitle_options() { let s = Settings::parse("showSubtitles:true\nnotificationDisplayTime:2.5\n"); assert!(s.show_subtitles);