Skip to content

Commit 72634bd

Browse files
authored
Fix incorrect color display on X and S+ due to invalid pointer (#32)
1 parent b37b1af commit 72634bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/screen.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ pub fn sdk_bagl_hal_draw_bitmap_within_rect(
4242
inverted: bool,
4343
bitmap: &[u8],
4444
) {
45-
let inverted_ptr = [inverted as u32, !inverted as u32].as_ptr();
45+
let inverted = [inverted as u32, !inverted as u32];
4646
unsafe {
4747
bagl_hal_draw_bitmap_within_rect(
4848
x,
4949
y,
5050
width,
5151
height,
5252
2,
53-
inverted_ptr,
53+
inverted.as_ptr(),
5454
1,
5555
bitmap.as_ptr(),
5656
(bitmap.len() * 8) as u32,

0 commit comments

Comments
 (0)