patch modals to handle multiple platform targets

This commit is contained in:
buncram 2025-02-11 08:36:58 +08:00
parent 9cdb967741
commit 60c28c10b4
4 changed files with 20 additions and 5 deletions

View file

@ -19,20 +19,26 @@ rkyv = { version = "0.8.8", default-features = false, features = [
"std",
"alloc",
] }
gam = { path = "../gam" }
gam = { path = "../gam", optional = true }
trng = { path = "../trng", optional = true }
cram-hal-service = { path = "../cram-hal-service", optional = true } # provides trng for cramium-soc
tts-frontend = { path = "../tts" }
tts-frontend = { path = "../tts", optional = true }
locales = { path = "../../locales" }
bit_field = "0.9.0"
cramium-hal = { path = "../../libs/cramium-hal", optional = true, features = [
"std",
] }
ux-api = { path = "../../libs/ux-api", optional = true, features = ["std"] }
utralib = { version = "0.1.25", optional = true, default-features = false }
[features]
precursor = ["utralib/precursor", "trng"]
hosted = ["utralib/hosted", "trng"]
renode = ["utralib/renode", "trng"]
precursor = ["utralib/precursor", "trng", "gam", "tts-frontend"]
hosted = ["utralib/hosted", "trng", "gam", "tts-frontend"]
hosted-baosec = ["ux-api"]
renode = ["utralib/renode", "trng", "gam", "tts-frontend"]
cramium-soc = ["utralib/cramium-soc", "cram-hal-service"]
tts = []
ditherpunk = []
hazardous-debug = []

View file

@ -1,6 +1,9 @@
#[cfg(feature = "ditherpunk")]
use gam::Tile;
#[cfg(not(any(feature = "hosted-baosec")))]
use gam::modal::*;
#[cfg(any(feature = "hosted-baosec"))]
use ux_api::widgets::*;
pub(crate) const SERVER_NAME_MODALS: &str = "_Modal Dialog Server_";

View file

@ -12,8 +12,11 @@ use std::cmp::max;
use std::convert::TryInto;
use bit_field::BitField;
#[cfg(not(any(feature = "hosted-baosec")))]
use gam::*;
use num_traits::*;
#[cfg(any(feature = "hosted-baosec"))]
use ux_api::widgets::*;
use xous::{CID, Message, send_message};
use xous_ipc::Buffer;

View file

@ -31,10 +31,13 @@ mod api;
use api::*;
#[cfg(feature = "ditherpunk")]
use gam::Bitmap;
#[cfg(not(any(feature = "hosted-baosec")))]
use gam::modal::*;
use locales::t;
#[cfg(feature = "tts")]
use tts_frontend::TtsFrontend;
#[cfg(any(feature = "hosted-baosec"))]
use ux_api::widgets::*;
use xous::{Message, msg_blocking_scalar_unpack, msg_scalar_unpack, send_message};
use xous_ipc::Buffer;
#[cfg(feature = "tts")]