Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion source/hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ static const char **hook_names = (const char *[]){
"WUPS_LOADER_HOOK_APPLICATION_REQUESTS_EXIT",
"WUPS_LOADER_HOOK_APPLICATION_ENDS",
"WUPS_LOADER_HOOK_INIT_STORAGE",
"WUPS_LOADER_HOOK_INIT_CONFIG"};
"WUPS_LOADER_HOOK_INIT_CONFIG",
"WUPS_LOADER_HOOK_INIT_BUTTON_COMBO",
};

void CallHook(const std::vector<PluginContainer> &plugins, const wups_loader_hook_type_t hook_type) {
CallHook(plugins, hook_type, [](const auto &) { return true; });
Expand Down
7 changes: 6 additions & 1 deletion source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@
#include <coreinit/interrupts.h>
#include <coreinit/scheduler.h>

#include <coreinit/cache.h>
#include <thread>

WUMS_MODULE_EXPORT_NAME("homebrew_wupsbackend");
WUMS_USE_WUT_DEVOPTAB();
WUMS_DEPENDS_ON(homebrew_functionpatcher);
WUMS_DEPENDS_ON(homebrew_memorymapping);
WUMS_DEPENDS_ON(homebrew_notifications);
WUMS_DEPENDS_ON(homebrew_buttoncombo);

using namespace std::chrono_literals;

Expand Down Expand Up @@ -309,9 +311,12 @@ void CleanupPlugins(std::vector<PluginContainer> &&pluginsToDeinit) {
if (!pluginContainer.isLinkedAndLoaded() || cur.id != pluginContainer.getPluginLinkInformation().getTrampolineId()) {
continue;
}
cur.status = RELOC_TRAMP_FREE;
cur = {};
}
}
DCFlushRange((void *) gTrampData.data(), gTrampData.size() * sizeof(relocation_trampoline_entry_t));
ICInvalidateRange((void *) gTrampData.data(), gTrampData.size() * sizeof(relocation_trampoline_entry_t));
OSMemoryBarrier();
}
void CheckCleanupCallbackUsage(const std::vector<PluginContainer> &plugins) {
auto *curThread = OSGetCurrentThread();
Expand Down
4 changes: 2 additions & 2 deletions source/plugin/ButtonComboManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ namespace {
res |= WUPS_BUTTON_COMBO_BUTTON_B;
}
if (other & BCMPAD_BUTTON_X) {
res |= WUPS_BUTTON_COMBO_BUTTON_B;
res |= WUPS_BUTTON_COMBO_BUTTON_X;
}
if (other & BCMPAD_BUTTON_Y) {
res |= WUPS_BUTTON_COMBO_BUTTON_B;
res |= WUPS_BUTTON_COMBO_BUTTON_Y;
}
if (other & BCMPAD_BUTTON_LEFT) {
res |= WUPS_BUTTON_COMBO_BUTTON_LEFT;
Expand Down