WIP - drawlib - apple build fix

cepetr/drawlib-integration
cepetr 2 months ago
parent 8054de618b
commit 484394bb4d

@ -15,10 +15,10 @@ where
const BUMP_A_SIZE: usize = DrawingCache::get_bump_a_size();
const BUMP_B_SIZE: usize = DrawingCache::get_bump_b_size();
#[link_section = ".no_dma_buffers"]
#[cfg_attr(not(target_os = "macos"), link_section = ".no_dma_buffers")]
static mut BUMP_A: Bump<[u8; BUMP_A_SIZE]> = Bump::uninit();
#[link_section = ".buf"]
#[cfg_attr(not(target_os = "macos"), link_section = ".buf")]
static mut BUMP_B: Bump<[u8; BUMP_B_SIZE]> = Bump::uninit();
let bump_a = unsafe { &mut *core::ptr::addr_of_mut!(BUMP_A) };

@ -15,10 +15,10 @@ where
const BUMP_A_SIZE: usize = DrawingCache::get_bump_a_size();
const BUMP_B_SIZE: usize = DrawingCache::get_bump_b_size();
#[link_section = ".no_dma_buffers"]
#[cfg_attr(not(target_os = "macos"), link_section = ".no_dma_buffers")]
static mut BUMP_A: Bump<[u8; BUMP_A_SIZE]> = Bump::uninit();
#[link_section = ".buf"]
#[cfg_attr(not(target_os = "macos"), link_section = ".buf")]
static mut BUMP_B: Bump<[u8; BUMP_B_SIZE]> = Bump::uninit();
let bump_a = unsafe { &mut *core::ptr::addr_of_mut!(BUMP_A) };

@ -19,10 +19,10 @@ pub fn render_on_display<'a, F>(clip: Option<Rect>, bg_color: Option<Color>, fun
where
F: FnOnce(&mut ProgressiveRenderer<'_, 'a, Bump<[u8; BUMP_A_SIZE]>, DisplayCanvas>),
{
#[link_section = ".no_dma_buffers"]
#[cfg_attr(not(target_os = "macos"), link_section = ".no_dma_buffers")]
static mut BUMP_A: Bump<[u8; BUMP_A_SIZE]> = Bump::uninit();
#[link_section = ".buf"]
#[cfg_attr(not(target_os = "macos"), link_section = ".buf")]
static mut BUMP_B: Bump<[u8; BUMP_B_SIZE]> = Bump::uninit();
let bump_a = unsafe { &mut *core::ptr::addr_of_mut!(BUMP_A) };

@ -165,7 +165,7 @@ void display_init(void) {
#ifdef __APPLE__
// macOS Mojave SDL black screen workaround
SDL_PumpEvents();
SDL_SetWindowSize(WINDOW, WINDOW_WIDTH, WINDOW_HEIGHT);
SDL_SetWindowSize(drv->window, WINDOW_WIDTH, WINDOW_HEIGHT);
#endif
#ifdef TREZOR_EMULATOR_RASPI
#include "background_raspi.h"

Loading…
Cancel
Save