Dependency injection for apu/gpu/hid.

This commit is contained in:
Ben Vanik
2015-11-08 15:02:24 -08:00
parent 9a6c5c5c74
commit 5834a42ef3
34 changed files with 217 additions and 158 deletions

View File

@@ -66,7 +66,9 @@ bool TraceViewer::Setup() {
// Create the emulator but don't initialize so we can setup the window.
emulator_ = std::make_unique<Emulator>(L"");
X_STATUS result = emulator_->Setup(window_.get());
X_STATUS result =
emulator_->Setup(window_.get(), nullptr,
[this]() { return CreateGraphicsSystem(); }, nullptr);
if (XFAILED(result)) {
XELOGE("Failed to setup emulator: %.8X", result);
return false;