/** ****************************************************************************** * Xenia : Xbox 360 Emulator Research Project * ****************************************************************************** * Copyright 2013 Ben Vanik. All rights reserved. * * Released under the BSD license - see LICENSE in the root for more details. * ****************************************************************************** */ #include #include using namespace xe; using namespace xe::gpu; DEFINE_string(gpu, "any", "Graphics system. Use: [any, nop, d3d11]"); #include GraphicsSystem* xe::gpu::CreateNop(Emulator* emulator) { return xe::gpu::nop::Create(emulator); } #if XE_PLATFORM(WIN32) #include GraphicsSystem* xe::gpu::CreateD3D11(Emulator* emulator) { return xe::gpu::d3d11::Create(emulator); } #endif // WIN32 GraphicsSystem* xe::gpu::Create(Emulator* emulator) { if (FLAGS_gpu.compare("nop") == 0) { return CreateNop(emulator); #if XE_PLATFORM(WIN32) } else if (FLAGS_gpu.compare("d3d11") == 0) { return CreateD3D11(emulator); #endif // WIN32 } else { // Create best available. GraphicsSystem* best = NULL; #if XE_PLATFORM(WIN32) best = CreateD3D11(emulator); if (best) { return best; } #endif // WIN32 // Fallback to nop. return CreateNop(emulator); } }