cleanup
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 9m39s

This commit is contained in:
Florian RICHER 2025-05-30 21:54:58 +02:00
parent 2c169548b9
commit bc42892d39
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
5 changed files with 12 additions and 32 deletions

View file

@ -180,6 +180,7 @@ impl ApplicationContext {
f(&renderer)
}
/// Méthode utilitaire pour accéder au renderer de manière thread-safe
pub fn with_renderer_mut<T, F>(&mut self, f: F) -> T
where
F: FnOnce(&mut VulkanoWindowRenderer) -> T,
@ -194,6 +195,7 @@ impl ApplicationContext {
f(renderer)
}
/// Méthode utilitaire pour accéder au gui de manière thread-safe
pub fn with_gui<T, F>(&self, f: F) -> T
where
F: FnOnce(&Gui) -> T,
@ -202,6 +204,7 @@ impl ApplicationContext {
f(&gui)
}
/// Méthode utilitaire pour accéder au gui de manière thread-safe
pub fn with_gui_mut<T, F>(&mut self, f: F) -> T
where
F: FnOnce(&mut Gui) -> T,

View file

@ -33,6 +33,7 @@ pub struct App {
input_manager: Arc<Mutex<InputManager>>,
timer: Arc<Mutex<Timer>>,
event_loop_proxy: EventLoopProxy<UserEvent>,
// Context d'application partagé par fenêtre - architecture unifiée
app_contexts: HashMap<WindowId, Arc<Mutex<ApplicationContext>>>,
}

View file

@ -42,16 +42,9 @@ impl SceneManager {
}
pub fn current_scene_mut(&mut self) -> Option<&mut Box<dyn Scene>> {
log::debug!(
"current_scene_mut called - index: {:?}, scenes len: {}",
self.current_scene_index,
self.scenes.len()
);
if let Some(index) = self.current_scene_index {
log::debug!("Getting scene at index {}", index);
self.scenes.get_mut(index)
} else {
log::debug!("No current scene index set");
None
}
}
@ -60,21 +53,9 @@ impl SceneManager {
&mut self,
app_context: &mut ApplicationContext,
) -> Result<(), Box<dyn Error>> {
log::debug!("SceneManager::load_scene_if_not_loaded called");
log::debug!(
"Current scene index: {:?}, scenes count: {}",
self.current_scene_index,
self.scenes.len()
);
if let Some(scene) = self.current_scene_mut() {
log::debug!("Scene found, checking if loaded: {}", scene.loaded());
if !scene.loaded() {
log::debug!("Scene not loaded, loading...");
scene.load(app_context)?;
log::debug!("Scene loaded successfully");
} else {
log::debug!("Scene already loaded");
}
} else {
log::warn!("No scene found in SceneManager!");