HTTP client, game cover art fetcher, game list image display, use smol::LocalExecutor for async runtime

This commit is contained in:
Aleksander
2025-12-25 21:51:38 +01:00
parent 382735956a
commit bfad91bf72
13 changed files with 614 additions and 199 deletions

View File

@@ -25,6 +25,7 @@ use crate::{
util::{
popup_manager::{MountPopupParams, PopupManager, PopupManagerParams},
toast_manager::ToastManager,
various::AsyncExecutor,
},
views,
};
@@ -43,6 +44,9 @@ pub struct Frontend {
pub settings: Box<dyn settings::SettingsIO>,
pub interface: BoxDashInterface,
// async runtime executor
pub executor: AsyncExecutor,
#[allow(dead_code)]
state: ParserState,
@@ -146,6 +150,7 @@ impl Frontend {
toast_manager,
window_audio_settings: WguiWindow::default(),
view_audio_settings: None,
executor: Rc::new(smol::LocalExecutor::new()),
};
// init some things first
@@ -172,9 +177,13 @@ impl Frontend {
tab.update(TabUpdateParams {
layout: &mut layout,
interface: &mut self.interface,
executor: &mut self.executor,
})?;
}
// process async runtime tasks
while self.executor.try_tick() {}
self.tick(width, height, timestep_alpha)?;
self.ticks += 1;