cleanup
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 9m39s
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 9m39s
This commit is contained in:
parent
2c169548b9
commit
bc42892d39
5 changed files with 12 additions and 32 deletions
|
@ -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,
|
||||
|
|
|
@ -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>>>,
|
||||
}
|
||||
|
|
|
@ -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!");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue