mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
use bao-video to route the acquire/release of the modals focus
it has to route through here anyways, so this is the sensible place to also forward on the keyboard release/acquire messages
This commit is contained in:
parent
3faad803d3
commit
30fcc3016f
2 changed files with 10 additions and 1 deletions
|
|
@ -25,6 +25,7 @@ rkyv = { version = "0.8.8", default-features = false, features = [
|
||||||
"std",
|
"std",
|
||||||
"alloc",
|
"alloc",
|
||||||
] }
|
] }
|
||||||
|
modals = { path = "../modals", optional = true }
|
||||||
|
|
||||||
# QR decoding
|
# QR decoding
|
||||||
libm = { version = "0.2.8" }
|
libm = { version = "0.2.8" }
|
||||||
|
|
@ -34,6 +35,7 @@ rqrr = "0.8.0"
|
||||||
locales = { path = "../../locales" }
|
locales = { path = "../../locales" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
no-gam = ["modals/no-gam"]
|
||||||
gfx-testing = []
|
gfx-testing = []
|
||||||
ditherpunk = []
|
ditherpunk = []
|
||||||
|
|
||||||
|
|
@ -45,8 +47,9 @@ board-baosec = [
|
||||||
"cramium-hal",
|
"cramium-hal",
|
||||||
"ux-api/board-baosec",
|
"ux-api/board-baosec",
|
||||||
"blitstr2/board-baosec",
|
"blitstr2/board-baosec",
|
||||||
|
"no-gam",
|
||||||
]
|
]
|
||||||
hosted-baosec = ["cramium-emu", "ux-api/hosted-baosec"]
|
hosted-baosec = ["cramium-emu", "ux-api/hosted-baosec", "no-gam"]
|
||||||
|
|
||||||
# temporary feature - remove after we have properly created a camera control API
|
# temporary feature - remove after we have properly created a camera control API
|
||||||
autotest = []
|
autotest = []
|
||||||
|
|
|
||||||
|
|
@ -307,6 +307,8 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! {
|
||||||
cam.capture_async();
|
cam.capture_async();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "no-gam")]
|
||||||
|
let modals = modals::Modals::new(&xns).unwrap();
|
||||||
let mut modal_queue = VecDeque::<Sender>::new();
|
let mut modal_queue = VecDeque::<Sender>::new();
|
||||||
let mut frames = 0;
|
let mut frames = 0;
|
||||||
let mut frame = [0u8; IMAGE_WIDTH * IMAGE_HEIGHT];
|
let mut frame = [0u8; IMAGE_WIDTH * IMAGE_HEIGHT];
|
||||||
|
|
@ -650,6 +652,8 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! {
|
||||||
// ---- v2 graphics API
|
// ---- v2 graphics API
|
||||||
GfxOpcode::AcquireModal => {
|
GfxOpcode::AcquireModal => {
|
||||||
if let Some(scalar) = msg.body.scalar_message_mut() {
|
if let Some(scalar) = msg.body.scalar_message_mut() {
|
||||||
|
#[cfg(feature = "no-gam")]
|
||||||
|
modals.acquire_focus(); // relay this to the modals crate so it knows to ignore key presses
|
||||||
let sender = msg.sender;
|
let sender = msg.sender;
|
||||||
log::debug!("Acquirer Sender: {:x?}", sender);
|
log::debug!("Acquirer Sender: {:x?}", sender);
|
||||||
modal_queue.push_back(sender);
|
modal_queue.push_back(sender);
|
||||||
|
|
@ -665,6 +669,8 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! {
|
||||||
}
|
}
|
||||||
GfxOpcode::ReleaseModal => {
|
GfxOpcode::ReleaseModal => {
|
||||||
if let Some(_scalar) = msg.body.scalar_message() {
|
if let Some(_scalar) = msg.body.scalar_message() {
|
||||||
|
#[cfg(feature = "no-gam")]
|
||||||
|
modals.release_focus(); // relay this to the modals crate so it knows to ignore key presses
|
||||||
let sender = msg.sender;
|
let sender = msg.sender;
|
||||||
log::debug!("Release Sender: {:x?}", sender);
|
log::debug!("Release Sender: {:x?}", sender);
|
||||||
if let Some(pos) = modal_queue
|
if let Some(pos) = modal_queue
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue