mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 19:58:53 +00:00
VideoCommon: add graphics mod callback interface for when a texture is created
This commit is contained in:
parent
5ad2d86cc7
commit
1d767c3a5b
6 changed files with 48 additions and 2 deletions
|
@ -187,6 +187,16 @@ std::optional<GraphicsTargetConfig> DeserializeTargetFromConfig(const picojson::
|
|||
target.m_texture_info_string = texture_info.value();
|
||||
return target;
|
||||
}
|
||||
else if (type == "create_texture")
|
||||
{
|
||||
std::optional<std::string> texture_info = ExtractTextureFilenameForConfig(obj);
|
||||
if (!texture_info.has_value())
|
||||
return std::nullopt;
|
||||
|
||||
CreateTextureTarget target;
|
||||
target.m_texture_info_string = texture_info.value();
|
||||
return target;
|
||||
}
|
||||
else if (type == "efb")
|
||||
{
|
||||
return DeserializeFBTargetFromConfig<EFBTarget>(obj, EFB_DUMP_PREFIX);
|
||||
|
|
|
@ -26,6 +26,10 @@ struct LoadTextureTarget final : public TextureTarget
|
|||
{
|
||||
};
|
||||
|
||||
struct CreateTextureTarget final : public TextureTarget
|
||||
{
|
||||
};
|
||||
|
||||
struct FBTarget
|
||||
{
|
||||
u32 m_height = 0;
|
||||
|
@ -47,8 +51,9 @@ struct ProjectionTarget
|
|||
ProjectionType m_projection_type = ProjectionType::Perspective;
|
||||
};
|
||||
|
||||
using GraphicsTargetConfig = std::variant<DrawStartedTextureTarget, LoadTextureTarget, EFBTarget,
|
||||
XFBTarget, ProjectionTarget>;
|
||||
using GraphicsTargetConfig =
|
||||
std::variant<DrawStartedTextureTarget, LoadTextureTarget, CreateTextureTarget, EFBTarget,
|
||||
XFBTarget, ProjectionTarget>;
|
||||
|
||||
std::optional<GraphicsTargetConfig> DeserializeTargetFromConfig(const picojson::object& obj);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue