Conversation
8f9e076 to
08fdb6b
Compare
Supreeeme
left a comment
There was a problem hiding this comment.
- What are these changes for? What are they fixing?
- Quite a few of these commits can be squashed together.
src/extended_display.rs
Outdated
| #[derive(macros::InterfaceImpl)] | ||
| #[interface = "IVRExtendedDisplay"] | ||
| #[versions(001)] | ||
| pub struct ExtendedDisplay { |
There was a problem hiding this comment.
Is this interface actually needed? A lot of games seem to request it but all of the ones I've looked at function fine without it.
There was a problem hiding this comment.
Yes it was necessary for space engine. It would crash without getting proper window dimensions, as it would resize its in game overlays. See: #177 (comment)
| let mut result = self.CreateOverlay(key, name, handle); | ||
| if result == vr::EVROverlayError::None { | ||
| result = self.CreateOverlay(key, name, thumbnail_handle); | ||
| } | ||
| result |
There was a problem hiding this comment.
Creating dashboard overlay handles without actually creating the dashboard overlays seems pointless and misleading.
| transform: Option<(vr::ETrackingUniverseOrigin, vr::HmdMatrix34_t)>, | ||
| compositor: Option<SupportedBackend>, | ||
| rect: Option<xr::Rect2Di>, | ||
| flags: u32, |
There was a problem hiding this comment.
Instead of just storing a u32, you can have bindgen generate vr::VROverlayFlags as bitflags and just use it directly.
| name: *const c_char, | ||
| ) -> vr::EVROverlayError { | ||
| get_overlay!(self, handle, mut overlay); | ||
| overlay.set_name(unsafe { CStr::from_ptr(name).to_owned() }); |
| let key = unsafe { CStr::from_ptr(key) }; | ||
|
|
||
| let mut concatenation = key.to_bytes().to_vec(); | ||
| concatenation.extend_from_slice(b".thumbnail\0"); | ||
| let thumbnail_key = CString::from_vec_with_nul(concatenation).unwrap(); | ||
|
|
||
| result = self.CreateOverlay(thumbnail_key.as_ptr(), name, thumbnail_handle); |
| ) -> Result<(), vr::EVROverlayError> { | ||
| debug!("setting overlay raw texture on {:?} with size {width}x{height} and {bytes_per_pixel} bytes per pixel", self.name); | ||
|
|
||
| // let backend = self |
There was a problem hiding this comment.
Why is this giant chunk left commented out?
src/system.rs
Outdated
| let overlay = self | ||
| .overlay | ||
| .force(|injector| OverlayMan::new(self.openxr.clone(), injector)); |
src/system.rs
Outdated
| if overlay_handle.is_null() { | ||
| return false; | ||
| } | ||
| let overlay_handle = unsafe { *overlay_handle }; |
39e6e3b to
899aa76
Compare
899aa76 to
a276215
Compare
- Added version 026 to the IVROverlay interface versions list. - Updated the implementation of IVROverlay025On027 to IVROverlay026On027 for OverlayMan.
a276215 to
8c84a2a
Compare
This fixes a bug that caused #177
Also needed for UEVR crash