ditch multi-system idea

This commit is contained in:
CocoSimone
2022-08-06 11:19:45 +02:00
parent ef29e4797c
commit c5303ede59
58 changed files with 74 additions and 82 deletions

View File

@@ -12,6 +12,7 @@ using namespace RDP;
static CommandProcessor* command_processor;
static WSI* wsi;
static std::unique_ptr<ParallelRdpWindowInfo> windowInfo;
std::vector<Semaphore> acquire_semaphore;
@@ -109,14 +110,17 @@ public:
Program* fullscreen_quad_program;
void LoadWSIPlatform() {
WSI* LoadWSIPlatform(Vulkan::WSIPlatform* wsi_platform, std::unique_ptr<ParallelRdpWindowInfo>&& newWindowInfo) {
wsi = new WSI();
wsi->set_backbuffer_srgb(false);
wsi->set_platform(new SDLWSIPlatform());
wsi->set_platform(wsi_platform);
Context::SystemHandles handles;
if (!wsi->init_context_from_platform(1, handles)) {
util::panic("Failed to initialize WSI!");
}
windowInfo = std::move(newWindowInfo);
return wsi;
}
void LoadParallelRDP(const u8* rdram) {
@@ -161,6 +165,11 @@ void LoadParallelRDP(const u8* rdram) {
}
}
void InitParallelRDP(const u8* rdram) {
LoadWSIPlatform(new SDLWSIPlatform(), std::make_unique<SDLParallelRdpWindowInfo>());
LoadParallelRDP(rdram);
}
void DrawFullscreenTexturedQuad(Util::IntrusivePtr<Image> image, Util::IntrusivePtr<CommandBuffer> cmd) {
cmd->set_texture(0, 0, image->get_view(), Vulkan::StockSampler::LinearClamp);
cmd->set_program(fullscreen_quad_program);