Massive refactoring of all code + audio skeleton.
This should make it easier to find files and (in the future) split things up into separate libraries. It also changes around emulator initialization to make it a little more difficult to do things out of order and a little more sensible as to when real init work happens. Also adding a skeleton audio system/driver and reworking CPU register access to be more extensible.
This commit is contained in:
@@ -20,39 +20,39 @@ DEFINE_string(gpu, "any",
|
||||
"Graphics system. Use: [any, nop, d3d11]");
|
||||
|
||||
|
||||
#include <xenia/gpu/nop/nop.h>
|
||||
GraphicsSystem* xe::gpu::CreateNop(const CreationParams* params) {
|
||||
return xe::gpu::nop::Create(params);
|
||||
#include <xenia/gpu/nop/nop_gpu.h>
|
||||
GraphicsSystem* xe::gpu::CreateNop(Emulator* emulator) {
|
||||
return xe::gpu::nop::Create(emulator);
|
||||
}
|
||||
|
||||
|
||||
#if XE_PLATFORM(WIN32)
|
||||
#include <xenia/gpu/d3d11/d3d11.h>
|
||||
GraphicsSystem* xe::gpu::CreateD3D11(const CreationParams* params) {
|
||||
return xe::gpu::d3d11::Create(params);
|
||||
#include <xenia/gpu/d3d11/d3d11_gpu.h>
|
||||
GraphicsSystem* xe::gpu::CreateD3D11(Emulator* emulator) {
|
||||
return xe::gpu::d3d11::Create(emulator);
|
||||
}
|
||||
#endif // WIN32
|
||||
|
||||
|
||||
GraphicsSystem* xe::gpu::Create(const CreationParams* params) {
|
||||
GraphicsSystem* xe::gpu::Create(Emulator* emulator) {
|
||||
if (FLAGS_gpu.compare("nop") == 0) {
|
||||
return CreateNop(params);
|
||||
return CreateNop(emulator);
|
||||
#if XE_PLATFORM(WIN32)
|
||||
} else if (FLAGS_gpu.compare("d3d11") == 0) {
|
||||
return CreateD3D11(params);
|
||||
return CreateD3D11(emulator);
|
||||
#endif // WIN32
|
||||
} else {
|
||||
// Create best available.
|
||||
GraphicsSystem* best = NULL;
|
||||
|
||||
#if XE_PLATFORM(WIN32)
|
||||
best = CreateD3D11(params);
|
||||
best = CreateD3D11(emulator);
|
||||
if (best) {
|
||||
return best;
|
||||
}
|
||||
#endif // WIN32
|
||||
|
||||
// Fallback to nop.
|
||||
return CreateNop(params);
|
||||
return CreateNop(emulator);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user