Fix Series S two-plane black screen by reading RetailPlane at 72-byte stride
This commit is contained in:
1 parent
f5847e6248
commit
45e90f4de8
3 files changed
+129
-51
No files matched your search
@@ -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>> {
|
||||
|
||||
Reference in new issue
Block a user