core: `Player` should start in the `Idle` phase

This commit is contained in:
David Wendt 2022-01-22 18:54:00 -05:00 committed by kmeisthax
parent f0ef8adb42
commit 0400d4dee4
2 changed files with 7 additions and 1 deletions

View File

@ -69,6 +69,12 @@ pub enum FramePhase {
Idle,
}
impl Default for FramePhase {
fn default() -> Self {
FramePhase::Idle
}
}
/// Run one frame according to AVM1 frame order.
pub fn run_all_phases_avm1<'gc>(context: &mut UpdateContext<'_, 'gc, '_>) {
// In AVM1, we only ever execute the update phase, and all the work that

View File

@ -1877,7 +1877,7 @@ impl PlayerBuilder {
// Timing
frame_rate,
frame_phase: FramePhase::Enter,
frame_phase: Default::default(),
frame_accumulator: 0.0,
recent_run_frame_timings: VecDeque::with_capacity(10),
start_time: Instant::now(),