Clean up includes

This commit is contained in:
Maschell 2024-12-29 17:43:28 +01:00
parent eb12f209ce
commit 7ed6058b99
90 changed files with 393 additions and 165 deletions

View File

@ -1,9 +1,12 @@
#include "NotificationsUtils.h" #include "NotificationsUtils.h"
#include "globals.h" #include "globals.h"
#include "utils/logger.h" #include "utils/logger.h"
#include <cstring>
#include <notifications/notifications.h> #include <notifications/notifications.h>
#include <cstring>
bool DisplayNotificationMessage(std::string_view text, NotificationModuleNotificationType type, float duration) { bool DisplayNotificationMessage(std::string_view text, NotificationModuleNotificationType type, float duration) {
if (!gNotificationModuleLoaded) { if (!gNotificationModuleLoaded) {
return false; return false;

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include <string> #include <string_view>
bool DisplayInfoNotificationMessage(std::string_view text, float duration); bool DisplayInfoNotificationMessage(std::string_view text, float duration);

View File

@ -1,17 +1,28 @@
#include "PluginManagement.h" #include "PluginManagement.h"
#include "NotificationsUtils.h" #include "NotificationsUtils.h"
#include "hooks.h" #include "hooks.h"
#include "plugin/FunctionData.h"
#include "plugin/HookData.h"
#include "plugin/PluginConfigData.h"
#include "plugin/PluginContainer.h" #include "plugin/PluginContainer.h"
#include "plugin/PluginData.h"
#include "plugin/PluginLinkInformationFactory.h" #include "plugin/PluginLinkInformationFactory.h"
#include "plugin/PluginLoadWrapper.h" #include "plugin/PluginLoadWrapper.h"
#include "plugin/PluginMetaInformationFactory.h" #include "plugin/PluginMetaInformationFactory.h"
#include "plugin/RelocationData.h"
#include "plugin/SectionInfo.h"
#include "utils/ElfUtils.h" #include "utils/ElfUtils.h"
#include "utils/StringTools.h" #include "utils/StringTools.h"
#include "utils/utils.h" #include "utils/logger.h"
#include <wums/defines/relocation_defines.h>
#include <coreinit/cache.h> #include <coreinit/cache.h>
#include <coreinit/dynload.h>
#include <memory.h> #include <vector>
#include <ranges>
#include <cstdint>
static uint32_t sTrampolineID = 0; static uint32_t sTrampolineID = 0;

View File

@ -1,12 +1,16 @@
#pragma once #pragma once
#include "plugin/PluginContainer.h" #include <wums/defines/relocation_defines.h>
#include "plugin/PluginLoadWrapper.h"
#include <coreinit/dynload.h> #include <coreinit/dynload.h>
#include <functional> #include <functional>
#include <map> #include <map>
#include <set> #include <string>
#include <wums/defines/relocation_defines.h>
class RelocationData;
class PluginLoadWrapper;
class PluginContainer;
class PluginManagement { class PluginManagement {
public: public:

View File

@ -18,6 +18,7 @@
#pragma once #pragma once
#include "WUPSConfigCategory.h" #include "WUPSConfigCategory.h"
#include <string_view> #include <string_view>
namespace WUPSConfigAPIBackend { namespace WUPSConfigAPIBackend {

View File

@ -1,4 +1,5 @@
#include "WUPSConfigAPI.h" #include "WUPSConfigAPI.h"
#include "WUPSConfig.h" #include "WUPSConfig.h"
#include "WUPSConfigCategory.h" #include "WUPSConfigCategory.h"
#include "WUPSConfigItem.h" #include "WUPSConfigItem.h"
@ -10,13 +11,14 @@
#include "utils/logger.h" #include "utils/logger.h"
#include "utils/utils.h" #include "utils/utils.h"
#include <memory>
#include <ranges>
#include <vector>
#include <wums/exports.h> #include <wums/exports.h>
#include <wups/config.h>
#include <wups/config_api.h> #include <wups/config_api.h>
#include <bits/ranges_algo.h>
#include <memory>
#include <mutex>
#include <vector>
namespace WUPSConfigAPIBackend { namespace WUPSConfigAPIBackend {
std::vector<std::unique_ptr<WUPSConfig>> sConfigs; std::vector<std::unique_ptr<WUPSConfig>> sConfigs;

View File

@ -1,11 +1,13 @@
#pragma once #pragma once
#include "WUPSConfig.h"
#include "WUPSConfigCategory.h"
#include "WUPSConfigItem.h"
#include <wups/config.h> #include <wups/config.h>
#include <memory>
namespace WUPSConfigAPIBackend { namespace WUPSConfigAPIBackend {
class WUPSConfigItem;
class WUPSConfig;
class WUPSConfigCategory;
namespace Intern { namespace Intern {
/** /**
* @brief Retrieves a WUPSConfig pointer based on a given handle. * @brief Retrieves a WUPSConfig pointer based on a given handle.

View File

@ -1,7 +1,9 @@
#include "WUPSConfig.h" #include "WUPSConfig.h"
#include "WUPSConfigAPI.h" #include "WUPSConfigAPI.h"
#include "WUPSConfigItem.h"
#include "utils/logger.h" #include "utils/logger.h"
#include <wums.h>
#include <wums/exports.h>
#include <wups/config.h> #include <wups/config.h>
int32_t WUPSConfig_Create(void **out, const char *name) { int32_t WUPSConfig_Create(void **out, const char *name) {

View File

@ -1,5 +1,9 @@
#include "WUPSConfigCategory.h" #include "WUPSConfigCategory.h"
#include "WUPSConfigItem.h"
#include <memory>
#include <string>
#include <vector>
namespace WUPSConfigAPIBackend { namespace WUPSConfigAPIBackend {

View File

@ -16,13 +16,13 @@
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "WUPSConfigItem.h"
#include <memory> #include <memory>
#include <string> #include <string>
#include <vector> #include <vector>
namespace WUPSConfigAPIBackend { namespace WUPSConfigAPIBackend {
class WUPSConfigItem;
class WUPSConfigCategory { class WUPSConfigCategory {
public: public:
explicit WUPSConfigCategory(std::string_view name); explicit WUPSConfigCategory(std::string_view name);

View File

@ -1,5 +1,7 @@
#include "WUPSConfigItem.h" #include "WUPSConfigItem.h"
#include <string>
namespace WUPSConfigAPIBackend { namespace WUPSConfigAPIBackend {
WUPSConfigItem::WUPSConfigItem(std::string displayName) : mDisplayName(std::move(displayName)) { WUPSConfigItem::WUPSConfigItem(std::string displayName) : mDisplayName(std::move(displayName)) {
} }

View File

@ -17,9 +17,10 @@
#pragma once #pragma once
#include <string>
#include <wups/config.h> #include <wups/config.h>
#include <string>
namespace WUPSConfigAPIBackend { namespace WUPSConfigAPIBackend {
class WUPSConfigItem { class WUPSConfigItem {
public: public:

View File

@ -1,7 +1,12 @@
#include "WUPSConfigItemV1.h" #include "WUPSConfigItemV1.h"
#include "utils/StringTools.h" #include "utils/StringTools.h"
#include "utils/logger.h" #include "utils/logger.h"
#include <wups/config.h>
#include <string>
namespace WUPSConfigAPIBackend { namespace WUPSConfigAPIBackend {
WUPSConfigItemV1::WUPSConfigItemV1(const std::string_view configId, WUPSConfigItemV1::WUPSConfigItemV1(const std::string_view configId,
const std::string_view displayName, const std::string_view displayName,

View File

@ -1,9 +1,10 @@
#pragma once #pragma once
#include "WUPSConfigItem.h" #include "WUPSConfigItem.h"
#include <string>
#include <wups/config.h> #include <wups/config.h>
#include <string>
namespace WUPSConfigAPIBackend { namespace WUPSConfigAPIBackend {
class WUPSConfigItemV1 final : public WUPSConfigItem { class WUPSConfigItemV1 final : public WUPSConfigItem {
public: public:

View File

@ -1,9 +1,10 @@
#include "WUPSConfigItemV2.h" #include "WUPSConfigItemV2.h"
#include <wups/config.h>
#include "utils/StringTools.h" #include "utils/StringTools.h"
#include "utils/logger.h" #include "utils/logger.h"
#include <string> #include <string>
#include <wups/config.h>
namespace WUPSConfigAPIBackend { namespace WUPSConfigAPIBackend {
WUPSConfigItemV2::WUPSConfigItemV2(const std::string_view displayName, WUPSConfigItemV2::WUPSConfigItemV2(const std::string_view displayName,

View File

@ -1,9 +1,11 @@
#pragma once #pragma once
#include "WUPSConfigItem.h" #include "WUPSConfigItem.h"
#include <string>
#include <wups/config.h> #include <wups/config.h>
#include <string>
namespace WUPSConfigAPIBackend { namespace WUPSConfigAPIBackend {
class WUPSConfigItemV2 final : public WUPSConfigItem { class WUPSConfigItemV2 final : public WUPSConfigItem {
public: public:

View File

@ -1,9 +1,11 @@
#include "fs/CFile.hpp"
#include "utils/utils.h" #include "utils/utils.h"
#include <cstdarg> #include <cstdarg>
#include <cstdio> #include <cstdio>
#include <fs/CFile.hpp> #include <sys/_default_fcntl.h>
#include <strings.h>
CFile::CFile() { CFile::CFile() {
iFd = -1; iFd = -1;

View File

@ -1,12 +1,12 @@
#pragma once #pragma once
#include <cstdio>
#include <cstring>
#include <fcntl.h>
#include <string>
#include <unistd.h>
#include <wut_types.h> #include <wut_types.h>
#include <string>
#include <cstdio>
#include <unistd.h>
class CFile { class CFile {
public: public:
enum eOpenTypes { enum eOpenTypes {

View File

@ -24,18 +24,18 @@
* DirList Class * DirList Class
* for WiiXplorer 2010 * for WiiXplorer 2010
***************************************************************************/ ***************************************************************************/
#include "fs/DirList.h"
#include "utils/StringTools.h"
#include <algorithm> #include <algorithm>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string> #include <string>
#include <cstring>
#include <stdio.h>
#include <strings.h> #include <strings.h>
#include <sys/dirent.h> #include <sys/dirent.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fs/DirList.h>
#include <utils/StringTools.h>
DirList::DirList() { DirList::DirList() {
Flags = 0; Flags = 0;
Filter = 0; Filter = 0;

View File

@ -27,9 +27,10 @@
#ifndef ___DIRLIST_H_ #ifndef ___DIRLIST_H_
#define ___DIRLIST_H_ #define ___DIRLIST_H_
#include <wut_types.h>
#include <string> #include <string>
#include <vector> #include <vector>
#include <wut_types.h>
typedef struct { typedef struct {
char *FilePath; char *FilePath;

View File

@ -1,12 +1,14 @@
#include "fs/FSUtils.h" #include "fs/FSUtils.h"
#include "utils/logger.h" #include "utils/logger.h"
#include "utils/utils.h" #include "utils/utils.h"
#include <filesystem>
#include <vector>
#include <cstdio> #include <cstdio>
#include <cstring> #include <cstring>
#include <fcntl.h> #include <fcntl.h>
#include <filesystem>
#include <unistd.h> #include <unistd.h>
#include <vector>
int32_t FSUtils::LoadFileToMem(std::string_view filepath, std::vector<uint8_t> &buffer) { int32_t FSUtils::LoadFileToMem(std::string_view filepath, std::vector<uint8_t> &buffer) {
//! always initialize input //! always initialize input

View File

@ -1,8 +1,9 @@
#pragma once #pragma once
#include <wut_types.h>
#include <string> #include <string>
#include <vector> #include <vector>
#include <wut_types.h>
class FSUtils { class FSUtils {
public: public:

View File

@ -1,7 +1,15 @@
#include "globals.h" #include "globals.h"
#include "plugin/FunctionData.h"
#include "plugin/HookData.h"
#include "plugin/PluginConfigData.h"
#include "plugin/PluginContainer.h" #include "plugin/PluginContainer.h"
#include "plugin/PluginData.h" #include "plugin/PluginData.h"
#include "plugin/PluginLinkInformation.h"
#include "plugin/PluginLoadWrapper.h" #include "plugin/PluginLoadWrapper.h"
#include "plugin/RelocationData.h"
#include "plugin/SectionInfo.h"
StoredBuffer gStoredTVBuffer = {}; StoredBuffer gStoredTVBuffer = {};
StoredBuffer gStoredDRCBuffer = {}; StoredBuffer gStoredDRCBuffer = {};

View File

@ -2,13 +2,16 @@
#include "utils/config/ConfigDefines.h" #include "utils/config/ConfigDefines.h"
#include "version.h" #include "version.h"
#include <wums/defines/relocation_defines.h>
#include <coreinit/dynload.h> #include <coreinit/dynload.h>
#include <coreinit/thread.h> #include <coreinit/thread.h>
#include <map> #include <map>
#include <memory> #include <memory>
#include <set> #include <set>
#include <vector> #include <vector>
#include <wums/defines/relocation_defines.h>
#define MODULE_VERSION "v0.3.5" #define MODULE_VERSION "v0.3.5"
#define MODULE_VERSION_FULL MODULE_VERSION MODULE_VERSION_EXTRA #define MODULE_VERSION_FULL MODULE_VERSION MODULE_VERSION_EXTRA

View File

@ -1,15 +1,20 @@
#include "hooks.h" #include "hooks.h"
#include "plugin/HookData.h"
#include "plugin/PluginConfigData.h"
#include "plugin/PluginContainer.h" #include "plugin/PluginContainer.h"
#include "plugin/PluginData.h"
#include "utils/StorageUtilsDeprecated.h" #include "utils/StorageUtilsDeprecated.h"
#include "utils/buttoncombo/ButtonComboUtils.h" #include "utils/buttoncombo/ButtonComboUtils.h"
#include "utils/logger.h" #include "utils/logger.h"
#include "utils/storage/StorageUtils.h" #include "utils/storage/StorageUtils.h"
#include <functional>
#include <wups/button_combo.h> #include <wups/button_combo.h>
#include <wups/button_combo_internal.h> #include <wups/button_combo_internal.h>
#include <wups/storage.h> #include <wups/storage.h>
#include <functional>
static const char **hook_names = (const char *[]){ static const char **hook_names = (const char *[]){
"WUPS_LOADER_HOOK_INIT_WUT_MALLOC", "WUPS_LOADER_HOOK_INIT_WUT_MALLOC",
"WUPS_LOADER_HOOK_FINI_WUT_MALLOC", "WUPS_LOADER_HOOK_FINI_WUT_MALLOC",

View File

@ -1,10 +1,11 @@
#pragma once #pragma once
#include "plugin/PluginContainer.h" #include <wups/hooks.h>
#include <functional> #include <functional>
#include <vector> #include <vector>
#include <wups/hooks.h>
class PluginContainer;
void CallHook(const std::vector<PluginContainer> &plugins, wups_loader_hook_type_t hook_type, const std::function<bool(const PluginContainer &)> &pred); void CallHook(const std::vector<PluginContainer> &plugins, wups_loader_hook_type_t hook_type, const std::function<bool(const PluginContainer &)> &pred);

View File

@ -1,22 +1,34 @@
#include "PluginManagement.h" #include "PluginManagement.h"
#include "coreinit/interrupts.h"
#include "coreinit/scheduler.h"
#include "globals.h" #include "globals.h"
#include "hooks.h" #include "hooks.h"
#include "patcher/hooks_patcher_static.h" #include "patcher/hooks_patcher_static.h"
#include "plugin/FunctionData.h"
#include "plugin/HookData.h"
#include "plugin/PluginConfigData.h"
#include "plugin/PluginContainer.h"
#include "plugin/PluginData.h"
#include "plugin/PluginDataFactory.h" #include "plugin/PluginDataFactory.h"
#include "plugin/PluginLoadWrapper.h"
#include "plugin/RelocationData.h"
#include "plugin/SectionInfo.h"
#include "utils/DrawUtils.h" #include "utils/DrawUtils.h"
#include "utils/WUPSBackendSettings.h" #include "utils/WUPSBackendSettings.h"
#include "utils/input/VPADInput.h" #include "utils/input/VPADInput.h"
#include "utils/logger.h" #include "utils/logger.h"
#include "utils/utils.h" #include "utils/utils.h"
#include "version.h"
#include <buttoncombo/manager.h> #include <buttoncombo/manager.h>
#include <coreinit/debug.h> #include <function_patcher/function_patching.h>
#include <notifications/notification_defines.h>
#include <notifications/notifications.h> #include <notifications/notifications.h>
#include <ranges>
#include <wums.h> #include <wums/meta.h>
#include <wups/hooks.h>
#include <coreinit/interrupts.h>
#include <coreinit/scheduler.h>
#include <thread>
WUMS_MODULE_EXPORT_NAME("homebrew_wupsbackend"); WUMS_MODULE_EXPORT_NAME("homebrew_wupsbackend");
WUMS_USE_WUT_DEVOPTAB(); WUMS_USE_WUT_DEVOPTAB();

View File

@ -1,11 +1,15 @@
#include "hooks_patcher_static.h" #include "hooks_patcher_static.h"
#include "globals.h" #include "globals.h"
#include "hooks.h"
#include "plugin/PluginConfigData.h"
#include "plugin/PluginContainer.h"
#include "plugin/PluginData.h"
#include "plugin/SectionInfo.h"
#include "utils/config/ConfigUtils.h" #include "utils/config/ConfigUtils.h"
#include <coreinit/core.h> #include <coreinit/core.h>
#include <coreinit/messagequeue.h> #include <coreinit/messagequeue.h>
#include <hooks.h>
#include <padscore/wpad.h> #include <padscore/wpad.h>
#include <vpad/input.h> #include <vpad/input.h>

View File

@ -2,6 +2,8 @@
#include <function_patcher/function_patching.h> #include <function_patcher/function_patching.h>
#include <cstdint>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View File

@ -1,7 +1,9 @@
#include "ButtonComboManager.h" #include "ButtonComboManager.h"
#include "utils/logger.h"
#include "utils/utils.h"
#include <buttoncombo/manager.h> #include <buttoncombo/manager.h>
#include <utils/logger.h>
#include <utils/utils.h>
#include <wups/button_combo_internal.h> #include <wups/button_combo_internal.h>
namespace { namespace {

View File

@ -1,11 +1,14 @@
#pragma once #pragma once
#include <buttoncombo/defines.h> #include <buttoncombo/defines.h>
#include <cstdint>
#include <wups/button_combo.h>
#include <functional> #include <functional>
#include <memory> #include <memory>
#include <vector> #include <vector>
#include <wups/button_combo.h>
#include <cstdint>
class ButtonComboWrapper; class ButtonComboWrapper;

View File

@ -2,6 +2,7 @@
#include "utils/logger.h" #include "utils/logger.h"
#include <function_patcher/function_patching.h> #include <function_patcher/function_patching.h>
#include <string> #include <string>
FunctionData::FunctionData(void *paddress, void *vaddress, FunctionData::FunctionData(void *paddress, void *vaddress,

View File

@ -17,6 +17,7 @@
#pragma once #pragma once
#include <function_patcher/fpatching_defines.h> #include <function_patcher/fpatching_defines.h>
#include <string> #include <string>
class FunctionData { class FunctionData {

View File

@ -17,9 +17,10 @@
#pragma once #pragma once
#include <cstdint>
#include <string> #include <string>
#include <cstdint>
class FunctionSymbolData { class FunctionSymbolData {
public: public:

View File

@ -1,6 +1,6 @@
#include "PluginConfigData.h" #include "PluginConfigData.h"
#include "config/WUPSConfigAPI.h"
#include <config/WUPSConfigAPI.h> #include "plugin/PluginData.h"
PluginConfigData::PluginConfigData(const std::string_view name, PluginConfigData::PluginConfigData(const std::string_view name,
const WUPSConfigAPI_MenuOpenedCallback openedCallback, const WUPSConfigAPI_MenuOpenedCallback openedCallback,

View File

@ -1,9 +1,10 @@
#pragma once #pragma once
#include <wups/config.h>
#include <wups/config_api.h>
#include <optional> #include <optional>
#include <string> #include <string>
#include <wups/config.h>
#include <wups/config_api.h>
class PluginConfigData { class PluginConfigData {
public: public:

View File

@ -1,7 +1,15 @@
#include "PluginContainer.h" #include "PluginContainer.h"
#include "plugin/FunctionData.h"
#include "plugin/HookData.h"
#include "plugin/PluginConfigData.h"
#include "plugin/PluginData.h"
#include "plugin/PluginLinkInformation.h"
#include "plugin/RelocationData.h"
#include "plugin/SectionInfo.h"
#include "utils/buttoncombo/ButtonComboUtils.h"
#include "utils/storage/StorageUtils.h" #include "utils/storage/StorageUtils.h"
#include <utils/buttoncombo/ButtonComboUtils.h> #include <optional>
PluginContainer::PluginContainer(PluginMetaInformation metaInformation, PluginLinkInformation pluginLinkInformation, std::shared_ptr<PluginData> pluginData) PluginContainer::PluginContainer(PluginMetaInformation metaInformation, PluginLinkInformation pluginLinkInformation, std::shared_ptr<PluginData> pluginData)
: mMetaInformation(std::move(metaInformation)), : mMetaInformation(std::move(metaInformation)),

View File

@ -18,13 +18,15 @@
#pragma once #pragma once
#include "PluginConfigData.h" #include "PluginConfigData.h"
#include "PluginData.h"
#include "PluginLinkInformation.h" #include "PluginLinkInformation.h"
#include "PluginMetaInformation.h" #include "PluginMetaInformation.h"
#include <wups/storage.h>
#include <memory> #include <memory>
#include <optional> #include <optional>
#include <wups/storage.h>
class PluginData;
class PluginContainer { class PluginContainer {
public: public:

View File

@ -17,12 +17,13 @@
#pragma once #pragma once
#include <cstdint>
#include <memory> #include <memory>
#include <span> #include <span>
#include <string> #include <string>
#include <vector> #include <vector>
#include <cstdint>
class PluginData { class PluginData {
public: public:
explicit PluginData(std::vector<uint8_t> &&buffer, std::string_view source); explicit PluginData(std::vector<uint8_t> &&buffer, std::string_view source);

View File

@ -17,6 +17,7 @@
#include "PluginDataFactory.h" #include "PluginDataFactory.h"
#include "NotificationsUtils.h" #include "NotificationsUtils.h"
#include "PluginData.h"
#include "PluginLoadWrapper.h" #include "PluginLoadWrapper.h"
#include "fs/FSUtils.h" #include "fs/FSUtils.h"
#include "utils/StringTools.h" #include "utils/StringTools.h"
@ -24,6 +25,7 @@
#include <memory> #include <memory>
#include <set> #include <set>
#include <sys/dirent.h> #include <sys/dirent.h>
std::vector<PluginLoadWrapper> PluginDataFactory::loadDir(const std::string_view path, const std::set<std::string> &inactivePluginsFilenames) { std::vector<PluginLoadWrapper> PluginDataFactory::loadDir(const std::string_view path, const std::set<std::string> &inactivePluginsFilenames) {

View File

@ -16,13 +16,14 @@
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "PluginData.h"
#include "PluginLoadWrapper.h"
#include <memory> #include <memory>
#include <set> #include <set>
#include <vector> #include <vector>
class PluginData;
class PluginLoadWrapper;
class PluginDataFactory { class PluginDataFactory {
public: public:
static std::vector<PluginLoadWrapper> loadDir(std::string_view path, const std::set<std::string> &inactivePluginsFilenames); static std::vector<PluginLoadWrapper> loadDir(std::string_view path, const std::set<std::string> &inactivePluginsFilenames);

View File

@ -1,5 +1,10 @@
#include "PluginLinkInformation.h" #include "PluginLinkInformation.h"
#include "FunctionData.h"
#include "HookData.h"
#include "RelocationData.h"
#include "SectionInfo.h"
PluginLinkInformation::PluginLinkInformation(PluginLinkInformation &&src) : mHookDataList(std::move(src.mHookDataList)), PluginLinkInformation::PluginLinkInformation(PluginLinkInformation &&src) : mHookDataList(std::move(src.mHookDataList)),
mFunctionDataList(std::move(src.mFunctionDataList)), mFunctionDataList(std::move(src.mFunctionDataList)),
mRelocationDataList(std::move(src.mRelocationDataList)), mRelocationDataList(std::move(src.mRelocationDataList)),
@ -13,7 +18,7 @@ PluginLinkInformation::PluginLinkInformation(PluginLinkInformation &&src) : mHoo
src.mTrampolineId = {}; src.mTrampolineId = {};
} }
PluginLinkInformation &PluginLinkInformation::operator=(PluginLinkInformation &&src) { PluginLinkInformation &PluginLinkInformation::operator=(PluginLinkInformation &&src) noexcept {
if (this != &src) { if (this != &src) {
this->mHookDataList = std::move(src.mHookDataList); this->mHookDataList = std::move(src.mHookDataList);
this->mFunctionDataList = std::move(src.mFunctionDataList); this->mFunctionDataList = std::move(src.mFunctionDataList);

View File

@ -17,19 +17,20 @@
#pragma once #pragma once
#include "FunctionData.h"
#include "FunctionSymbolData.h" #include "FunctionSymbolData.h"
#include "HookData.h"
#include "RelocationData.h"
#include "SectionInfo.h"
#include "utils/HeapMemoryFixedSize.h" #include "utils/HeapMemoryFixedSize.h"
#include <cstdint>
#include <map> #include <map>
#include <optional> #include <optional>
#include <set> #include <set>
#include <string>
#include <vector> #include <vector>
class HeapMemoryFixedSize;
class SectionInfo;
class RelocationData;
class FunctionData;
class HookData;
struct FunctionSymbolDataComparator { struct FunctionSymbolDataComparator {
bool operator()(const FunctionSymbolData &lhs, bool operator()(const FunctionSymbolData &lhs,
const FunctionSymbolData &rhs) const { const FunctionSymbolData &rhs) const {
@ -45,7 +46,7 @@ public:
PluginLinkInformation(PluginLinkInformation &&src) noexcept; PluginLinkInformation(PluginLinkInformation &&src) noexcept;
PluginLinkInformation &operator=(PluginLinkInformation &&src); PluginLinkInformation &operator=(PluginLinkInformation &&src) noexcept;
[[nodiscard]] const std::vector<HookData> &getHookDataList() const; [[nodiscard]] const std::vector<HookData> &getHookDataList() const;

View File

@ -16,14 +16,23 @@
****************************************************************************/ ****************************************************************************/
#include "PluginLinkInformationFactory.h" #include "PluginLinkInformationFactory.h"
#include "FunctionData.h"
#include "HookData.h"
#include "PluginData.h"
#include "PluginLinkInformation.h"
#include "RelocationData.h"
#include "SectionInfo.h"
#include "utils/ElfUtils.h" #include "utils/ElfUtils.h"
#include "utils/HeapMemoryFixedSize.h"
#include "utils/logger.h" #include "utils/logger.h"
#include "utils/utils.h" #include "utils/utils.h"
#include "utils/wiiu_zlib.hpp" #include "utils/wiiu_zlib.hpp"
#include <coreinit/cache.h>
#include <wups/function_patching.h> #include <wups/function_patching.h>
#include <coreinit/cache.h>
using namespace ELFIO; using namespace ELFIO;
std::optional<PluginLinkInformation> std::optional<PluginLinkInformation>

View File

@ -16,12 +16,16 @@
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "PluginData.h"
#include "PluginLinkInformation.h" #include <wums/defines/relocation_defines.h>
#include <elfio/elfio.hpp> #include <elfio/elfio.hpp>
#include <optional> #include <optional>
#include <wums/defines/relocation_defines.h> #include <span>
class PluginData;
class PluginLinkInformation;
class PluginLinkInformationFactory { class PluginLinkInformationFactory {
public: public:

View File

@ -1,7 +1,9 @@
#pragma once #pragma once
#include "PluginData.h"
#include <memory> #include <memory>
class PluginData;
class PluginLoadWrapper { class PluginLoadWrapper {
public: public:
PluginLoadWrapper(std::shared_ptr<PluginData> pluginData, const bool linkAndLoad) : mPluginData(std::move(pluginData)), mIsLoadAndLink(linkAndLoad) { PluginLoadWrapper(std::shared_ptr<PluginData> pluginData, const bool linkAndLoad) : mPluginData(std::move(pluginData)), mIsLoadAndLink(linkAndLoad) {

View File

@ -1,5 +1,7 @@
#include "PluginMetaInformation.h" #include "PluginMetaInformation.h"
#include <cstdint>
[[nodiscard]] const std::string &PluginMetaInformation::getName() const { [[nodiscard]] const std::string &PluginMetaInformation::getName() const {
return mName; return mName;
} }

View File

@ -18,8 +18,13 @@
#pragma once #pragma once
#include "WUPSVersion.h" #include "WUPSVersion.h"
#include <string> #include <string>
#include <cstdint>
class WUPSVersion;
class PluginMetaInformation { class PluginMetaInformation {
public: public:
[[nodiscard]] const std::string &getName() const; [[nodiscard]] const std::string &getName() const;

View File

@ -19,11 +19,11 @@
#include "PluginData.h" #include "PluginData.h"
#include "PluginMetaInformation.h" #include "PluginMetaInformation.h"
#include "elfio/elfio.hpp"
#include "fs/FSUtils.h" #include "fs/FSUtils.h"
#include "utils/logger.h" #include "utils/logger.h"
#include "utils/wiiu_zlib.hpp" #include "utils/wiiu_zlib.hpp"
#include <elfio/elfio.hpp>
#include <optional> #include <optional>
std::optional<PluginMetaInformation> PluginMetaInformationFactory::loadPlugin(const PluginData &pluginData, PluginParseErrors &error) { std::optional<PluginMetaInformation> PluginMetaInformationFactory::loadPlugin(const PluginData &pluginData, PluginParseErrors &error) {

View File

@ -17,13 +17,15 @@
#pragma once #pragma once
#include "PluginData.h"
#include "PluginMetaInformation.h"
#include <optional> #include <optional>
#include <span> #include <span>
#include <string_view> #include <string_view>
#include <cstdint>
class PluginData;
class PluginMetaInformation;
enum PluginParseErrors { enum PluginParseErrors {
PLUGIN_PARSE_ERROR_NONE, PLUGIN_PARSE_ERROR_NONE,
PLUGIN_PARSE_ERROR_UNKNOWN, PLUGIN_PARSE_ERROR_UNKNOWN,

View File

@ -18,10 +18,12 @@
#pragma once #pragma once
#include "ImportRPLInformation.h" #include "ImportRPLInformation.h"
#include <cstdint>
#include <memory> #include <memory>
#include <string> #include <string>
#include <cstdint>
class RelocationData { class RelocationData {
public: public:

View File

@ -17,9 +17,10 @@
#pragma once #pragma once
#include <cstdint>
#include <string> #include <string>
#include <cstdint>
class SectionInfo { class SectionInfo {
public: public:

View File

@ -1,7 +1,10 @@
#include <cstdint> #pragma once
#include <optional> #include <optional>
#include <string> #include <string>
#include <cstdint>
class WUPSVersion { class WUPSVersion {
public: public:
WUPSVersion(int major, int minor, int revision); WUPSVersion(int major, int minor, int revision);

View File

@ -4,14 +4,18 @@
#include "globals.h" #include "globals.h"
#include "logger.h" #include "logger.h"
#include "utils.h" #include "utils.h"
#include <png.h>
#include <memory/mappedmemory.h>
#include <avm/tv.h> #include <avm/tv.h>
#include <coreinit/cache.h> #include <coreinit/cache.h>
#include <coreinit/memory.h> #include <coreinit/memory.h>
#include <coreinit/screen.h> #include <coreinit/screen.h>
#include <cstdlib>
#include <memory/mappedmemory.h>
#include <padscore/kpad.h> #include <padscore/kpad.h>
#include <png.h>
#include <cstdlib>
// buffer width // buffer width
#define DRC_WIDTH 0x380 #define DRC_WIDTH 0x380

View File

@ -1,9 +1,11 @@
#pragma once #pragma once
#include "schrift.h" #include "schrift.h"
#include <cstdint>
#include <functional> #include <functional>
#include <cstdint>
// visible screen sizes // visible screen sizes
#define SCREEN_WIDTH 854 #define SCREEN_WIDTH 854
#define SCREEN_HEIGHT 480 #define SCREEN_HEIGHT 480

View File

@ -1,8 +1,9 @@
#pragma once #pragma once
#include <cstdint>
#include <wums/defines/relocation_defines.h> #include <wums/defines/relocation_defines.h>
#include <cstdint>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View File

@ -1,4 +1,5 @@
#include "HeapMemoryFixedSize.h" #include "HeapMemoryFixedSize.h"
#include "utils.h" #include "utils.h"
HeapMemoryFixedSize::HeapMemoryFixedSize() = default; HeapMemoryFixedSize::HeapMemoryFixedSize() = default;

View File

@ -1,8 +1,9 @@
#pragma once #pragma once
#include <cstdint>
#include <memory> #include <memory>
#include <cstdint>
class HeapMemoryFixedSize { class HeapMemoryFixedSize {
public: public:
HeapMemoryFixedSize(); HeapMemoryFixedSize();

View File

@ -1,4 +1,5 @@
#pragma once #pragma once
#include <cstdint> #include <cstdint>
namespace WUPSStorageDeprecated { namespace WUPSStorageDeprecated {

View File

@ -25,9 +25,10 @@
***************************************************************************/ ***************************************************************************/
#include "StringTools.h" #include "StringTools.h"
#include <cstring>
#include <string> #include <string>
#include <strings.h>
#include <cstring>
std::string StringTools::truncate(const std::string &str, const size_t width, const bool show_ellipsis) { std::string StringTools::truncate(const std::string &str, const size_t width, const bool show_ellipsis) {
if (str.length() > width - 3) { if (str.length() > width - 3) {

View File

@ -27,7 +27,9 @@
#include "logger.h" #include "logger.h"
#include "utils.h" #include "utils.h"
#include <coreinit/debug.h> #include <coreinit/debug.h>
#include <memory> #include <memory>
#include <string> #include <string>

View File

@ -1,9 +1,10 @@
#include "WUPSBackendSettings.h" #include "WUPSBackendSettings.h"
#include "fs/CFile.hpp" #include "fs/CFile.hpp"
#include "fs/FSUtils.h" #include "fs/FSUtils.h"
#include "utils/logger.h" #include "utils/logger.h"
#include "utils/utils.h" #include "utils/utils.h"
#include <span>
#include <string> #include <string>
#include <vector> #include <vector>

View File

@ -1,7 +1,6 @@
#pragma once #pragma once
#include <set> #include <set>
#include <span>
#include <string> #include <string>
namespace WUPSBackendSettings { namespace WUPSBackendSettings {

View File

@ -1,11 +1,12 @@
#include "ButtonComboUtils.h" #include "ButtonComboUtils.h"
#include "plugin/ButtonComboManager.h"
#include "plugin/PluginContainer.h"
#include "utils/logger.h"
#include "utils/utils.h"
#include <forward_list> #include <forward_list>
#include <mutex> #include <mutex>
#include <plugin/ButtonComboManager.h>
#include <plugin/PluginContainer.h>
#include <utils/logger.h>
#include <utils/utils.h>
namespace ButtonComboUtils::API { namespace ButtonComboUtils::API {
static std::forward_list<ButtonComboManager> sButtonComboManager; static std::forward_list<ButtonComboManager> sButtonComboManager;
@ -118,7 +119,7 @@ namespace ButtonComboUtils::API {
WUPSButtonCombo_Error UpdateButtonCombo(void *identifier, WUPSButtonCombo_Error UpdateButtonCombo(void *identifier,
const WUPSButtonCombo_ComboHandle handle, const WUPSButtonCombo_ComboHandle handle,
WUPSButtonCombo_Buttons combo, const WUPSButtonCombo_Buttons combo,
WUPSButtonCombo_ComboStatus *outStatus) { WUPSButtonCombo_ComboStatus *outStatus) {
WUPSButtonCombo_ComboStatus tmpStatus; WUPSButtonCombo_ComboStatus tmpStatus;
const auto res = ExecuteForIdentifierLocked(identifier, const auto res = ExecuteForIdentifierLocked(identifier,

View File

@ -2,6 +2,8 @@
#include <wups/button_combo.h> #include <wups/button_combo.h>
#include <cstdint>
namespace ButtonComboUtils::API { namespace ButtonComboUtils::API {
namespace Internal { namespace Internal {
uint32_t CreateButtonComboData(); uint32_t CreateButtonComboData();

View File

@ -1,11 +1,21 @@
#include "CategoryRenderer.h" #include "CategoryRenderer.h"
#include "ConfigDefines.h"
#include "ConfigRendererItem.h" #include "ConfigRendererItem.h"
#include "ConfigRendererItemCategory.h" #include "ConfigRendererItemCategory.h"
#include "ConfigRendererItemGeneric.h"
#include "ConfigUtils.h" #include "ConfigUtils.h"
#include "utils/DrawUtils.h" #include "utils/DrawUtils.h"
#include "utils/StringTools.h" #include "utils/StringTools.h"
#include "utils/input/Input.h"
#include "utils/logger.h" #include "utils/logger.h"
#include "utils/utils.h"
#include <wups/config.h>
#include <algorithm>
#include <cassert>
#include <cstdint>
CategoryRenderer::CategoryRenderer(const GeneralConfigInformation *info, const WUPSConfigAPIBackend::WUPSConfigCategory *cat, const bool isRoot) CategoryRenderer::CategoryRenderer(const GeneralConfigInformation *info, const WUPSConfigAPIBackend::WUPSConfigCategory *cat, const bool isRoot)
: mInfo(info), mCat(cat), mIsRoot(isRoot) { : mInfo(info), mCat(cat), mIsRoot(isRoot) {

View File

@ -2,14 +2,21 @@
#include "ConfigDefines.h" #include "ConfigDefines.h"
#include "ConfigDisplayItem.h" #include "ConfigDisplayItem.h"
#include "ConfigRendererItemGeneric.h"
#include "config/WUPSConfigCategory.h"
#include "utils/input/Input.h"
#include <cstdint> #include <wups/config.h>
#include <memory> #include <memory>
#include <vector> #include <vector>
#include <cstdint>
namespace WUPSConfigAPIBackend {
class WUPSConfigCategory;
}
class Input;
class ConfigRendererItemGeneric;
class CategoryRenderer { class CategoryRenderer {
public: public:
@ -45,7 +52,7 @@ private:
const GeneralConfigInformation *mInfo = {}; const GeneralConfigInformation *mInfo = {};
const WUPSConfigAPIBackend::WUPSConfigCategory *mCat = {}; const WUPSConfigAPIBackend::WUPSConfigCategory *mCat = {};
std::vector<std::unique_ptr<ConfigRendererItemGeneric>> mItemRenderer = {}; std::vector<std::unique_ptr<ConfigRendererItemGeneric>> mItemRenderer;
bool mIsItemMovementAllowed = true; bool mIsItemMovementAllowed = true;
bool mFirstFrame = true; bool mFirstFrame = true;
bool mIsRoot = false; bool mIsRoot = false;

View File

@ -1,8 +1,9 @@
#pragma once #pragma once
#include <cstdint>
#include <gx2/surface.h> #include <gx2/surface.h>
#include <cstdint>
#define MAX_BUTTONS_ON_SCREEN 8 #define MAX_BUTTONS_ON_SCREEN 8
struct StoredBuffer { struct StoredBuffer {

View File

@ -1,6 +1,11 @@
#include "ConfigDisplayItem.h" #include "ConfigDisplayItem.h"
#include "config/WUPSConfig.h" #include "config/WUPSConfig.h"
#include <memory>
#include <cassert>
ConfigDisplayItem::ConfigDisplayItem(GeneralConfigInformation &info, ConfigDisplayItem::ConfigDisplayItem(GeneralConfigInformation &info,
std::unique_ptr<WUPSConfigAPIBackend::WUPSConfig> config, std::unique_ptr<WUPSConfigAPIBackend::WUPSConfig> config,
const bool isActive) : mConfig(std::move(config)), const bool isActive) : mConfig(std::move(config)),

View File

@ -2,6 +2,7 @@
#include "config/WUPSConfig.h" #include "config/WUPSConfig.h"
#include "plugin/PluginData.h" #include "plugin/PluginData.h"
#include <memory> #include <memory>
#include <string> #include <string>

View File

@ -1,15 +1,21 @@
#include "ConfigRenderer.h" #include "ConfigRenderer.h"
#include "CategoryRenderer.h"
#include "ConfigDisplayItem.h"
#include "config/WUPSConfigItem.h"
#include "globals.h" #include "globals.h"
#include "plugin/PluginLoadWrapper.h" #include "plugin/PluginLoadWrapper.h"
#include "utils/DrawUtils.h" #include "utils/DrawUtils.h"
#include "utils/StringTools.h" #include "utils/StringTools.h"
#include "utils/input/Input.h"
#include "utils/logger.h" #include "utils/logger.h"
#include "utils/utils.h"
#include <algorithm>
ConfigRenderer::ConfigRenderer(std::vector<ConfigDisplayItem> &&vec) : mConfigs(std::move(vec)) { ConfigRenderer::ConfigRenderer(std::vector<ConfigDisplayItem> &&vec) : mConfigs(std::move(vec)) {
std::copy(mConfigs.begin(), mConfigs.end(), std::ranges::copy(mConfigs,
std::back_inserter(mAllConfigs)); std::back_inserter(mAllConfigs));
std::copy_if(mConfigs.begin(), mConfigs.end(), std::ranges::copy_if(mConfigs,
std::back_inserter(mActiveConfigs), std::back_inserter(mActiveConfigs),
[&](const auto &value) { [&](const auto &value) {
return value.isActivePlugin(); return value.isActivePlugin();
@ -205,7 +211,7 @@ void ConfigRenderer::RenderStateMain() const {
auto countInactivePlugins = mAllConfigs.size() - mActiveConfigs.size(); auto countInactivePlugins = mAllConfigs.size() - mActiveConfigs.size();
if (countInactivePlugins > 0) { if (countInactivePlugins > 0) {
DrawUtils::setFontSize(14); DrawUtils::setFontSize(14);
std::string plugin_unloaded = string_format("Found %d inactive plugins", countInactivePlugins); const std::string plugin_unloaded = string_format("Found %d inactive plugins", countInactivePlugins);
DrawUtils::print(SCREEN_WIDTH - 16 - DrawUtils::getTextWidth(MODULE_VERSION_FULL) - 32, 8 + 24, plugin_unloaded.c_str(), true); DrawUtils::print(SCREEN_WIDTH - 16 - DrawUtils::getTextWidth(MODULE_VERSION_FULL) - 32, 8 + 24, plugin_unloaded.c_str(), true);
} }
} }

View File

@ -1,17 +1,23 @@
#pragma once #pragma once
#include "CategoryRenderer.h"
#include "ConfigDefines.h" #include "ConfigDefines.h"
#include "ConfigDisplayItem.h" #include "ConfigDisplayItem.h"
#include "plugin/PluginLoadWrapper.h"
#include "utils/input/Input.h"
#include <cstdint>
#include <functional>
#include <memory>
#include <vector>
#include <wups/config.h> #include <wups/config.h>
#include <memory>
#include <vector>
#include <cstdint>
namespace WUPSConfigAPIBackend {
class WUPSConfig;
class WUPSConfigCategory;
} // namespace WUPSConfigAPIBackend
class PluginLoadWrapper;
class Input;
class CategoryRenderer;
class ConfigDisplayItem;
class ConfigRenderer { class ConfigRenderer {
public: public:
@ -39,7 +45,7 @@ private:
void CallOnCloseCallback(const GeneralConfigInformation &info, const std::vector<std::unique_ptr<WUPSConfigAPIBackend::WUPSConfigCategory>> &categories); void CallOnCloseCallback(const GeneralConfigInformation &info, const std::vector<std::unique_ptr<WUPSConfigAPIBackend::WUPSConfigCategory>> &categories);
void CallOnCloseCallback(const GeneralConfigInformation &info, const WUPSConfigAPIBackend::WUPSConfig &config); void CallOnCloseCallback(const GeneralConfigInformation &info, const WUPSConfigAPIBackend::WUPSConfig &config);
const std::vector<std::reference_wrapper<ConfigDisplayItem>> &GetConfigList() const; [[nodiscard]] const std::vector<std::reference_wrapper<ConfigDisplayItem>> &GetConfigList() const;
enum State { enum State {
STATE_MAIN = 0, STATE_MAIN = 0,
@ -49,7 +55,7 @@ private:
std::vector<ConfigDisplayItem> mConfigs; std::vector<ConfigDisplayItem> mConfigs;
std::vector<std::reference_wrapper<ConfigDisplayItem>> mAllConfigs; std::vector<std::reference_wrapper<ConfigDisplayItem>> mAllConfigs;
std::vector<std::reference_wrapper<ConfigDisplayItem>> mActiveConfigs; std::vector<std::reference_wrapper<ConfigDisplayItem>> mActiveConfigs;
std::unique_ptr<CategoryRenderer> mCategoryRenderer = {}; std::unique_ptr<CategoryRenderer> mCategoryRenderer;
State mState = STATE_MAIN; State mState = STATE_MAIN;

View File

@ -1,5 +1,8 @@
#include "ConfigRendererItem.h" #include "ConfigRendererItem.h"
#include "utils/DrawUtils.h" #include "utils/DrawUtils.h"
#include <config/WUPSConfigItem.h>
#include <cassert> #include <cassert>
ConfigRendererItem::ConfigRendererItem(const WUPSConfigAPIBackend::WUPSConfigItem *item) : mItem(item) { ConfigRendererItem::ConfigRendererItem(const WUPSConfigAPIBackend::WUPSConfigItem *item) : mItem(item) {

View File

@ -1,11 +1,14 @@
#pragma once #pragma once
#include "ConfigRendererItemGeneric.h" #include "ConfigRendererItemGeneric.h"
#include "config/WUPSConfigItem.h"
#include <string>
#include <cstdint> #include <cstdint>
#include <string>
#include <wups/config.h> namespace WUPSConfigAPIBackend {
class WUPSConfigItem;
}
class ConfigRendererItem final : public ConfigRendererItemGeneric { class ConfigRendererItem final : public ConfigRendererItemGeneric {
public: public:

View File

@ -1,6 +1,8 @@
#pragma once #pragma once
#include "ConfigRendererItemGeneric.h"
#include "config/WUPSConfigCategory.h" //#include "ConfigRendererItemGeneric.h"
//#include "config/WUPSConfigCategory.h"
#include <cassert> #include <cassert>
class ConfigRendererItemCategory final : public ConfigRendererItemGeneric { class ConfigRendererItemCategory final : public ConfigRendererItemGeneric {

View File

@ -1,8 +1,10 @@
#include "ConfigRendererItemGeneric.h" #include "ConfigRendererItemGeneric.h"
#include "ConfigDefines.h"
#include "utils/DrawUtils.h" #include "utils/DrawUtils.h"
#include <string>
#include <wups/config.h>
ConfigRendererItemGeneric::~ConfigRendererItemGeneric() = default; ConfigRendererItemGeneric::~ConfigRendererItemGeneric() = default;
void ConfigRendererItemGeneric::drawGenericBoxAndText(const uint32_t yOffset, const std::string &displayName, const bool isHighlighted) const { void ConfigRendererItemGeneric::drawGenericBoxAndText(const uint32_t yOffset, const std::string &displayName, const bool isHighlighted) const {

View File

@ -1,9 +1,11 @@
#pragma once #pragma once
#include <cstdint>
#include <string>
#include <wups/config.h> #include <wups/config.h>
#include <string>
#include <cstdint>
class ConfigRendererItemGeneric { class ConfigRendererItemGeneric {
public: public:
virtual ~ConfigRendererItemGeneric(); virtual ~ConfigRendererItemGeneric();

View File

@ -1,26 +1,31 @@
#include "ConfigUtils.h" #include "ConfigUtils.h"
#include "ConfigDisplayItem.h"
#include "ConfigRenderer.h" #include "ConfigRenderer.h"
#include "config/WUPSConfigAPI.h" #include "config/WUPSConfigAPI.h"
#include "globals.h"
#include "hooks.h" #include "hooks.h"
#include "plugin/HookData.h"
#include "plugin/PluginContainer.h"
#include "plugin/PluginLoadWrapper.h" #include "plugin/PluginLoadWrapper.h"
#include "utils/DrawUtils.h" #include "utils/DrawUtils.h"
#include "utils/WUPSBackendSettings.h" #include "utils/WUPSBackendSettings.h"
#include "utils/dc.h"
#include "utils/input/CombinedInput.h" #include "utils/input/CombinedInput.h"
#include "utils/input/Input.h" #include "utils/input/Input.h"
#include "utils/input/VPADInput.h" #include "utils/input/VPADInput.h"
#include "utils/input/WPADInput.h" #include "utils/input/WPADInput.h"
#include "utils/logger.h" #include "utils/logger.h"
#include "utils/utils.h" #include "utils/utils.h"
#include "version.h"
#include <algorithm>
#include <coreinit/title.h>
#include <globals.h>
#include <memory>
#include <sysapp/launch.h>
#include <vector>
#include <wups/config.h> #include <wups/config.h>
#include <wups/hooks.h>
#include <coreinit/title.h>
#include <sysapp/launch.h>
#include <bits/ranges_algo.h>
#include <memory>
#include <vector>
WUPS_CONFIG_SIMPLE_INPUT ConfigUtils::convertInputs(const uint32_t buttons) { WUPS_CONFIG_SIMPLE_INPUT ConfigUtils::convertInputs(const uint32_t buttons) {
WUPSConfigButtons pressedButtons = WUPS_CONFIG_BUTTON_NONE; WUPSConfigButtons pressedButtons = WUPS_CONFIG_BUTTON_NONE;

View File

@ -1,9 +1,11 @@
#pragma once #pragma once
#include <cstdint>
#include <string_view>
#include <wups/config.h> #include <wups/config.h>
#include <string_view>
#include <cstdint>
#define MOVE_ITEM_INPUT_MASK (WUPS_CONFIG_BUTTON_B | WUPS_CONFIG_BUTTON_DOWN | WUPS_CONFIG_BUTTON_UP) #define MOVE_ITEM_INPUT_MASK (WUPS_CONFIG_BUTTON_B | WUPS_CONFIG_BUTTON_DOWN | WUPS_CONFIG_BUTTON_UP)
class ConfigUtils { class ConfigUtils {

View File

@ -3,14 +3,17 @@
#include "plugin/PluginContainer.h" #include "plugin/PluginContainer.h"
#include "plugin/PluginData.h" #include "plugin/PluginData.h"
#include "plugin/PluginDataFactory.h" #include "plugin/PluginDataFactory.h"
#include "plugin/PluginLoadWrapper.h"
#include "plugin/PluginMetaInformation.h" #include "plugin/PluginMetaInformation.h"
#include "plugin/PluginMetaInformationFactory.h" #include "plugin/PluginMetaInformationFactory.h"
#include "plugin/SectionInfo.h"
#include "utils.h" #include "utils.h"
#include <ranges>
#include <wums.h> #include <wums.h>
#include <wups_backend/import_defines.h> #include <wups_backend/import_defines.h>
#include <ranges>
static void fillPluginInformation(wups_backend_plugin_information *out, const PluginMetaInformation &metaInformation) { static void fillPluginInformation(wups_backend_plugin_information *out, const PluginMetaInformation &metaInformation) {
out->plugin_information_version = WUPS_BACKEND_PLUGIN_INFORMATION_VERSION; out->plugin_information_version = WUPS_BACKEND_PLUGIN_INFORMATION_VERSION;
strncpy(out->author, metaInformation.getAuthor().c_str(), sizeof(out->author) - 1); strncpy(out->author, metaInformation.getAuthor().c_str(), sizeof(out->author) - 1);

View File

@ -1,5 +1,6 @@
#pragma once #pragma once
#include "Input.h" #include "Input.h"
class CombinedInput final : public Input { class CombinedInput final : public Input {
public: public:
void combine(const Input &b) { void combine(const Input &b) {

View File

@ -17,6 +17,7 @@
****************************************************************************/ ****************************************************************************/
#include "Input.h" #include "Input.h"
#include <padscore/kpad.h> #include <padscore/kpad.h>
#include <padscore/wpad.h> #include <padscore/wpad.h>

View File

@ -1,10 +1,11 @@
#pragma once #pragma once
#include <cstdint>
#include <memory> #include <memory>
#include <string> #include <string>
#include <variant> #include <variant>
#include <vector> #include <vector>
#include <cstdint>
enum class StorageItemType { None, enum class StorageItemType { None,
Boolean, Boolean,

View File

@ -1,6 +1,7 @@
#pragma once #pragma once
#include "StorageSubItem.h" #include "StorageSubItem.h"
#include <string> #include <string>
class StorageItemRoot : public StorageSubItem { class StorageItemRoot : public StorageSubItem {

View File

@ -1,6 +1,6 @@
#include "StorageSubItem.h" #include "StorageSubItem.h"
#include <utils/utils.h> #include "utils/utils.h"
StorageSubItem::StorageSubItem(const std::string_view key) : StorageItem(key) { StorageSubItem::StorageSubItem(const std::string_view key) : StorageItem(key) {
} }

View File

@ -2,10 +2,11 @@
#include "StorageItem.h" #include "StorageItem.h"
#include <wups/storage.h>
#include <forward_list> #include <forward_list>
#include <map> #include <map>
#include <string> #include <string>
#include <wups/storage.h>
class StorageSubItem : public StorageItem { class StorageSubItem : public StorageItem {
public: public:

View File

@ -1,6 +1,6 @@
#include "StorageItem.h" #include "StorageUtils.h"
#include "StorageItemRoot.h" #include "StorageItemRoot.h"
#include "StorageSubItem.h"
#include "fs/CFile.hpp" #include "fs/CFile.hpp"
#include "fs/FSUtils.h" #include "fs/FSUtils.h"
#include "utils/base64.h" #include "utils/base64.h"
@ -9,9 +9,9 @@
#include "utils/utils.h" #include "utils/utils.h"
#include <forward_list> #include <forward_list>
#include <malloc.h>
#include <mutex> #include <mutex>
#include <wups/storage.h>
#include <cstring>
namespace StorageUtils { namespace StorageUtils {
std::forward_list<StorageItemRoot> gStorage; std::forward_list<StorageItemRoot> gStorage;

View File

@ -1,9 +1,11 @@
#pragma once #pragma once
#include <cstdint>
#include <string_view>
#include <wups/storage.h> #include <wups/storage.h>
#include <string_view>
#include <cstdint>
namespace StorageUtils::API { namespace StorageUtils::API {
namespace Internal { namespace Internal {
WUPSStorageError OpenStorage(std::string_view plugin_id, wups_storage_root_item &outItem); WUPSStorageError OpenStorage(std::string_view plugin_id, wups_storage_root_item &outItem);

View File

@ -6,13 +6,16 @@
#include "json.hpp" #include "json.hpp"
#include "logger.h" #include "logger.h"
#include <algorithm>
#include <coreinit/ios.h> #include <coreinit/ios.h>
#include <malloc.h>
#include <string>
#include <sys/dirent.h>
#include <wups/storage.h> #include <wups/storage.h>
#include <algorithm>
#include <string>
#include <malloc.h>
#include <sys/dirent.h>
static std::string sPluginPath; static std::string sPluginPath;
static std::string sModulePath; static std::string sModulePath;
static std::string sEnvironmentPath; static std::string sEnvironmentPath;

View File

@ -1,15 +1,18 @@
#pragma once #pragma once
#include "json.hpp" #include "json.hpp"
#include <algorithm>
#include <coreinit/dynload.h> #include <coreinit/dynload.h>
#include <cstdint>
#include <algorithm>
#include <forward_list> #include <forward_list>
#include <memory> #include <memory>
#include <mutex> #include <mutex>
#include <set> #include <set>
#include <vector> #include <vector>
#include <cstdint>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif