Start the audio system after the kernel state
Expose kernel state in emulator.h
This commit is contained in:
parent
b1920f4a87
commit
d1b2b4cde8
|
@ -110,10 +110,6 @@ X_STATUS Emulator::Setup() {
|
||||||
if (!processor_->Setup()) {
|
if (!processor_->Setup()) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = audio_system_->Setup();
|
|
||||||
if (result) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = graphics_system_->Setup(processor_.get(), main_window_->loop(),
|
result = graphics_system_->Setup(processor_.get(), main_window_->loop(),
|
||||||
main_window_.get());
|
main_window_.get());
|
||||||
if (result) {
|
if (result) {
|
||||||
|
@ -130,6 +126,11 @@ X_STATUS Emulator::Setup() {
|
||||||
// Shared kernel state.
|
// Shared kernel state.
|
||||||
kernel_state_ = std::make_unique<KernelState>(this);
|
kernel_state_ = std::make_unique<KernelState>(this);
|
||||||
|
|
||||||
|
result = audio_system_->Setup();
|
||||||
|
if (result) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
// HLE kernel modules.
|
// HLE kernel modules.
|
||||||
xboxkrnl_ = std::make_unique<XboxkrnlModule>(this, kernel_state_.get());
|
xboxkrnl_ = std::make_unique<XboxkrnlModule>(this, kernel_state_.get());
|
||||||
xam_ = std::make_unique<XamModule>(this, kernel_state_.get());
|
xam_ = std::make_unique<XamModule>(this, kernel_state_.get());
|
||||||
|
|
|
@ -66,6 +66,8 @@ class Emulator {
|
||||||
}
|
}
|
||||||
kernel::fs::FileSystem* file_system() const { return file_system_.get(); }
|
kernel::fs::FileSystem* file_system() const { return file_system_.get(); }
|
||||||
|
|
||||||
|
kernel::KernelState* kernel_state() const { return kernel_state_.get(); }
|
||||||
|
|
||||||
kernel::XboxkrnlModule* xboxkrnl() const { return xboxkrnl_.get(); }
|
kernel::XboxkrnlModule* xboxkrnl() const { return xboxkrnl_.get(); }
|
||||||
kernel::XamModule* xam() const { return xam_.get(); }
|
kernel::XamModule* xam() const { return xam_.get(); }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue