Skip to content

Commit e9b232e

Browse files
committed
Move power saving setting location and remove unused imports
1 parent a444316 commit e9b232e

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

alvr/client_openxr/src/extra_extensions/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ mod motion_tracking_bd;
99
mod multimodal_input;
1010
mod passthrough_fb;
1111
mod passthrough_htc;
12-
mod performance_settings;
1312

1413
pub use body_tracking_bd::*;
1514
pub use body_tracking_fb::*;
@@ -22,7 +21,6 @@ pub use motion_tracking_bd::*;
2221
pub use multimodal_input::*;
2322
pub use passthrough_fb::*;
2423
pub use passthrough_htc::*;
25-
pub use performance_settings::*;
2624
use std::ffi::CString;
2725
use std::mem;
2826

alvr/client_openxr/src/lib.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ mod lobby;
66
mod passthrough;
77
mod stream;
88

9-
use crate::{stream::ParsedStreamConfig};
9+
use crate::stream::ParsedStreamConfig;
1010
use alvr_client_core::{ClientCapabilities, ClientCoreContext, ClientCoreEvent};
1111
use alvr_common::{
1212
Fov, HAND_LEFT_ID, Pose, error,
@@ -262,16 +262,6 @@ pub fn entry_point() {
262262
.unwrap();
263263
}
264264

265-
if let Some(performance_settings) = xr_instance.exts().ext_performance_settings {
266-
let level = xr::PerfSettingsLevelEXT::POWER_SAVINGS;
267-
268-
let set_performance_level = performance_settings.perf_settings_set_performance_level;
269-
unsafe {
270-
set_performance_level(xr_session.as_raw(), xr::PerfSettingsDomainEXT::CPU, level);
271-
set_performance_level(xr_session.as_raw(), xr::PerfSettingsDomainEXT::GPU, level);
272-
}
273-
}
274-
275265
let capabilities = ClientCapabilities {
276266
default_view_resolution,
277267
refresh_rates,
@@ -326,6 +316,16 @@ pub fn entry_point() {
326316
.write()
327317
.select_sources(&lobby_interaction_sources);
328318

319+
if let Some(performance_settings) = xr_instance.exts().ext_performance_settings {
320+
let level = xr::PerfSettingsLevelEXT::POWER_SAVINGS;
321+
322+
let set_performance_level = performance_settings.perf_settings_set_performance_level;
323+
unsafe {
324+
set_performance_level(xr_session.as_raw(), xr::PerfSettingsDomainEXT::CPU, level);
325+
set_performance_level(xr_session.as_raw(), xr::PerfSettingsDomainEXT::GPU, level);
326+
}
327+
}
328+
329329
let mut session_running = false;
330330
let mut stream_context = None::<StreamContext>;
331331
let mut passthrough_layer = None;

0 commit comments

Comments
 (0)