Support pushing and poping a playing CDDA track
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "Overlay/Overlays.hpp"
|
||||
#include <FontWriter/fonts.hpp>
|
||||
#include <FontWriter/font_writer.hpp>
|
||||
#include <PSX/Audio/CDDA.hpp>
|
||||
#include <PSX/Periphery/periphery.hpp>
|
||||
#include <stdio.hpp>
|
||||
|
||||
@@ -102,6 +103,9 @@ static void setup() {
|
||||
break;
|
||||
}
|
||||
},MenuEntries);
|
||||
|
||||
const auto [first_track, last_track] = CDDA::get_tracks();
|
||||
CDDA::play(first_track);
|
||||
}
|
||||
|
||||
namespace NormalScene {
|
||||
@@ -157,8 +161,10 @@ namespace LoadingScene {
|
||||
render();
|
||||
GPU::swap_buffers_vsync(1);
|
||||
|
||||
CDDA::push_play();
|
||||
state_changer.asset_load();
|
||||
old_state_changer = state_changer;
|
||||
CDDA::pop_play();
|
||||
}
|
||||
|
||||
state_changer.main();
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#include "include/menu.hpp"
|
||||
#include <PSX/Audio/CDDA.hpp>
|
||||
#include <PSX/Periphery/periphery.hpp>
|
||||
|
||||
namespace Menu {
|
||||
@@ -42,9 +41,6 @@ namespace Menu {
|
||||
}
|
||||
|
||||
void BackMenu :: setup(JabyEngine::FontWriter* font_writer) {
|
||||
const auto [first_track, last_track] = CDDA::get_tracks();
|
||||
CDDA::play(first_track);
|
||||
|
||||
this->font_writer = font_writer;
|
||||
this->timeout.reset();
|
||||
this->waiting = false;
|
||||
|
Reference in New Issue
Block a user