Skip to content

Commit 3e766a1

Browse files
committed
macos and windows as 240
1 parent e72bdfc commit 3e766a1

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

frontends/rioterm/src/application.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,7 @@ impl ApplicationHandler<EventPayload> for Application<'_> {
10221022

10231023
WindowEvent::RedrawRequested => {
10241024
route.window.winit_window.pre_present_notify();
1025+
let start = std::time::Instant::now();
10251026
match route.path {
10261027
RoutePath::Assistant => {
10271028
route.window.screen.render_assistant(&route.assistant);
@@ -1030,8 +1031,7 @@ impl ApplicationHandler<EventPayload> for Application<'_> {
10301031
route.window.screen.render_welcome();
10311032
}
10321033
RoutePath::Terminal => {
1033-
let duration = route.window.screen.render();
1034-
route.window.compute_timestamp(duration);
1034+
route.window.screen.render();
10351035
}
10361036
RoutePath::ConfirmQuit => {
10371037
route
@@ -1040,8 +1040,10 @@ impl ApplicationHandler<EventPayload> for Application<'_> {
10401040
.render_dialog("Do you want to leave Rio?");
10411041
}
10421042
}
1043+
let duration = start.elapsed();
10431044
// println!("Time elapsed in render() is: {:?}", duration);
10441045
// }
1046+
route.window.compute_timestamp(duration);
10451047

10461048
event_loop.set_control_flow(ControlFlow::Wait);
10471049
}

frontends/rioterm/src/screen/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1904,8 +1904,7 @@ impl Screen<'_> {
19041904
self.sugarloaf.render();
19051905
}
19061906

1907-
#[inline]
1908-
pub fn render(&mut self) -> std::time::Duration {
1907+
pub fn render(&mut self) {
19091908
// let start_total = std::time::Instant::now();
19101909
// println!("_____________________________\nrender time elapsed");
19111910
let is_search_active = self.search_active();
@@ -1941,7 +1940,6 @@ impl Screen<'_> {
19411940
data
19421941
};
19431942
self.renderer.set_ime(self.ime.preedit());
1944-
let duration = std::time::Instant::now();
19451943
self.renderer.prepare_term(
19461944
&rows,
19471945
cursor,
@@ -1953,7 +1951,6 @@ impl Screen<'_> {
19531951
&self.search_state.focused_match,
19541952
);
19551953
self.sugarloaf.render();
1956-
let duration = duration.elapsed();
19571954
// In this case the configuration of blinking cursor is enabled
19581955
// and the terminal also have instructions of blinking enabled
19591956
// TODO: enable blinking for selection after adding debounce (https://github.com/raphamorim/rio/issues/437)
@@ -1962,7 +1959,6 @@ impl Screen<'_> {
19621959
.blink_cursor(self.renderer.config_blinking_interval);
19631960
}
19641961

1965-
duration
19661962
// let duration = start_total.elapsed();
19671963
// println!("Total whole render function is: {:?}\n", duration);
19681964
}

rio-backend/src/config/defaults.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@ pub fn default_cursor_interval() -> u64 {
1717

1818
#[inline]
1919
pub fn default_max_fps() -> u64 {
20-
if cfg!(target_os = "macos") {
20+
if cfg!(target_os = "macos") || cfg!(target_os = "windows") {
2121
240
22-
} else if cfg!(target_os = "windows") {
23-
120
2422
} else {
2523
90
2624
}

0 commit comments

Comments
 (0)