mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 13:20:27 -06:00
VideoCommon: add logic to read a GraphicsMod from configuration
This commit is contained in:
@ -0,0 +1,56 @@
|
||||
// Copyright 2022 Dolphin Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <variant>
|
||||
|
||||
#include <picojson.h>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "VideoCommon/TextureDecoder.h"
|
||||
#include "VideoCommon/XFMemory.h"
|
||||
|
||||
struct TextureTarget
|
||||
{
|
||||
std::string m_texture_info_string;
|
||||
};
|
||||
|
||||
struct DrawStartedTextureTarget final : public TextureTarget
|
||||
{
|
||||
};
|
||||
|
||||
struct LoadTextureTarget final : public TextureTarget
|
||||
{
|
||||
};
|
||||
|
||||
struct FBTarget
|
||||
{
|
||||
u32 m_height = 0;
|
||||
u32 m_width = 0;
|
||||
TextureFormat m_texture_format = TextureFormat::I4;
|
||||
};
|
||||
|
||||
struct EFBTarget final : public FBTarget
|
||||
{
|
||||
};
|
||||
|
||||
struct XFBTarget final : public FBTarget
|
||||
{
|
||||
};
|
||||
|
||||
struct ProjectionTarget
|
||||
{
|
||||
std::optional<std::string> m_texture_info_string;
|
||||
ProjectionType m_projection_type = ProjectionType::Perspective;
|
||||
};
|
||||
|
||||
using GraphicsTargetConfig = std::variant<DrawStartedTextureTarget, LoadTextureTarget, EFBTarget,
|
||||
XFBTarget, ProjectionTarget>;
|
||||
|
||||
std::optional<GraphicsTargetConfig> DeserializeTargetFromConfig(const picojson::object& obj);
|
||||
|
||||
void SerializeTargetToProfile(picojson::object* obj, const GraphicsTargetConfig& target);
|
||||
void DeserializeTargetFromProfile(const picojson::object& obj, GraphicsTargetConfig* target);
|
Reference in New Issue
Block a user