Fix Series S two-plane black screen by reading RetailPlane at 72-byte stride

This commit is contained in:
codec_d committed 2026-11-25 14:55:26 -08:00
1 parent f5847e6248
commit 45e90f4de8
3 files changed
+129 -51

No files matched your search

+8
View File
@@ -2379,6 +2379,14 @@ pub(crate) fn host_resource<'a>(
Some(unsafe { &*std::ptr::from_ref(&host.texture) })
}
/// Whether `this` is a valid title resource created by this runtime.
#[cfg(windows)]
pub(crate) fn is_resource(this: This) -> bool {
let mut table = [0; size_of::<usize>()];
crate::host::read_into(this.cast(), &mut table)
&& usize::from_ne_bytes(table) == RESOURCE_FUNCTIONS.0.as_ptr() as usize
}
/// A title texture's host copy, shared, for a list to hold.
#[cfg(windows)]
pub(crate) fn host_copy(this: This) -> Option<std::sync::Arc<HostTexture>> {