Skip to content

Flamingo priority and uninstalls#55

Open
Fernthedev wants to merge 10 commits into
masterfrom
more-flamingo
Open

Flamingo priority and uninstalls#55
Fernthedev wants to merge 10 commits into
masterfrom
more-flamingo

Conversation

@Fernthedev
Copy link
Copy Markdown
Collaborator

@Fernthedev Fernthedev commented Dec 23, 2025

Depends on sc2ad/Flamingo#11

    // new Hook API!
    modloader::ModInfo chroma = { "chroma", "1.0.0", 0 };
    auto hook = FLAMINGO_HOOK(il2cpp_utils::Logger, test2_hook).after(chroma).before("test-mod").install();

    if (false) {
        // uninstall the hook, which will also remove it from flamingo
        // hook is now invalid after this call
        auto builder = hook.uninstall().get_result();

        builder.after("another-mod").before("test-mod-2").final();
        // reinstall the hook
        hook = builder.install();
    }

@Fernthedev Fernthedev marked this pull request as ready for review December 29, 2025 22:20
Comment thread shared/utils/flamingo-utils.hpp
Comment thread shared/utils/flamingo-utils.hpp Outdated
Comment thread shared/utils/flamingo-utils.hpp Outdated
Comment thread shared/utils/flamingo-utils.hpp Outdated
Comment thread src/tests/hook-tests.cpp Outdated
// reinstall after setting priorities
auto& hook = INSTALL_HOOK(il2cpp_utils::Logger, test2_hook).after(chroma).before("test").reinstall();

if (false) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why condition this out? Compiler could optimize this out and theoretically avoid even linting this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants