diff --git a/src/xenia/emulator.cc b/src/xenia/emulator.cc index a909f2ba8..a88760980 100644 --- a/src/xenia/emulator.cc +++ b/src/xenia/emulator.cc @@ -110,10 +110,6 @@ X_STATUS Emulator::Setup() { if (!processor_->Setup()) { return result; } - result = audio_system_->Setup(); - if (result) { - return result; - } result = graphics_system_->Setup(processor_.get(), main_window_->loop(), main_window_.get()); if (result) { @@ -130,6 +126,11 @@ X_STATUS Emulator::Setup() { // Shared kernel state. kernel_state_ = std::make_unique(this); + result = audio_system_->Setup(); + if (result) { + return result; + } + // HLE kernel modules. xboxkrnl_ = std::make_unique(this, kernel_state_.get()); xam_ = std::make_unique(this, kernel_state_.get()); diff --git a/src/xenia/emulator.h b/src/xenia/emulator.h index ab8145c2e..6d389a7f5 100644 --- a/src/xenia/emulator.h +++ b/src/xenia/emulator.h @@ -66,6 +66,8 @@ class Emulator { } 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::XamModule* xam() const { return xam_.get(); }