implements PLN-0151
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use crate::task::TaskId;
|
||||
use crate::{CrashReport, GameLibrary, SystemOS};
|
||||
use prometeu_hal::color::Color;
|
||||
use prometeu_hal::primitives::Rect;
|
||||
@@ -194,6 +195,29 @@ impl PrometeuHub {
|
||||
SystemProfileUpdate { crash, action }
|
||||
}
|
||||
|
||||
pub fn update_vm_shell_profile(
|
||||
&mut self,
|
||||
os: &mut SystemOS,
|
||||
task_id: TaskId,
|
||||
signals: &InputSignals,
|
||||
platform: &mut dyn RuntimePlatform,
|
||||
) -> SystemProfileUpdate {
|
||||
let mut crash = None;
|
||||
let mut action = self.gui_update(os, platform);
|
||||
|
||||
if os.windows().focused_window().is_some() {
|
||||
if platform.input().pad().start().down {
|
||||
action = Some(SystemProfileAction::CloseShell);
|
||||
} else if action != Some(SystemProfileAction::CloseShell) {
|
||||
crash = os.vm().tick_session(task_id, signals, platform);
|
||||
}
|
||||
}
|
||||
|
||||
self.render(os, platform);
|
||||
|
||||
SystemProfileUpdate { crash, action }
|
||||
}
|
||||
|
||||
pub fn update_native_shell_profile(
|
||||
&mut self,
|
||||
os: &mut SystemOS,
|
||||
|
||||
Reference in New Issue
Block a user