2020-12-11 16:41:37 +01:00
|
|
|
#include "main.h"
|
2023-01-26 13:01:46 +01:00
|
|
|
#include "DRCAttachCallback.h"
|
2023-01-26 12:52:00 +01:00
|
|
|
#include "config.h"
|
2020-12-11 16:41:37 +01:00
|
|
|
#include "retain_vars.hpp"
|
2023-01-22 14:45:20 +01:00
|
|
|
#include "thread.h"
|
2022-09-24 17:57:29 +02:00
|
|
|
#include "utils/WUPSConfigItemButtonCombo.h"
|
2020-12-11 16:41:37 +01:00
|
|
|
#include "utils/logger.h"
|
2023-01-26 12:46:03 +01:00
|
|
|
#include "utils/utils.h"
|
2023-01-22 16:38:23 +01:00
|
|
|
#include <notifications/notifications.h>
|
2018-07-01 19:12:35 +02:00
|
|
|
#include <string>
|
2020-12-11 16:41:37 +01:00
|
|
|
#include <wups.h>
|
2018-07-01 19:12:35 +02:00
|
|
|
|
|
|
|
// Mandatory plugin information.
|
2020-12-11 16:41:37 +01:00
|
|
|
WUPS_PLUGIN_NAME("Screenshot plugin");
|
2018-07-01 19:12:35 +02:00
|
|
|
WUPS_PLUGIN_DESCRIPTION("This plugin allows you to make screenshots that will be saved to the sd card");
|
2020-12-11 16:41:37 +01:00
|
|
|
WUPS_PLUGIN_VERSION(VERSION_FULL);
|
2018-07-01 19:12:35 +02:00
|
|
|
WUPS_PLUGIN_AUTHOR("Maschell");
|
|
|
|
WUPS_PLUGIN_LICENSE("GPL");
|
|
|
|
|
|
|
|
// FS Access
|
2020-12-11 16:41:37 +01:00
|
|
|
WUPS_USE_WUT_DEVOPTAB();
|
|
|
|
|
2018-07-01 19:12:35 +02:00
|
|
|
// Gets called once the loader exists.
|
|
|
|
INITIALIZE_PLUGIN() {
|
2020-12-11 16:41:37 +01:00
|
|
|
initLogging();
|
2023-01-26 12:52:00 +01:00
|
|
|
InitConfig();
|
2023-01-26 13:21:35 +01:00
|
|
|
if (gEnabled) {
|
|
|
|
InitNotificationModule();
|
|
|
|
}
|
2018-07-01 19:12:35 +02:00
|
|
|
}
|
|
|
|
|
2023-01-22 16:38:23 +01:00
|
|
|
DEINITIALIZE_PLUGIN() {
|
|
|
|
NotificationModule_DeInitLibrary();
|
|
|
|
}
|
|
|
|
|
2023-01-26 13:01:46 +01:00
|
|
|
ON_ACQUIRED_FOREGROUND() {
|
|
|
|
InitDRCAttachCallbacks();
|
|
|
|
}
|
|
|
|
|
2020-12-11 16:41:37 +01:00
|
|
|
// Called whenever an application was started.
|
|
|
|
ON_APPLICATION_START() {
|
|
|
|
initLogging();
|
2023-01-26 12:46:03 +01:00
|
|
|
|
|
|
|
gShortNameEn = GetSanitizedNameOfCurrentApplication();
|
2023-01-22 14:45:20 +01:00
|
|
|
startFSIOThreads();
|
2023-01-26 12:55:37 +01:00
|
|
|
|
|
|
|
ApplyGameSpecificPatches();
|
|
|
|
|
2023-01-26 13:01:46 +01:00
|
|
|
InitDRCAttachCallbacks();
|
2020-12-11 16:41:37 +01:00
|
|
|
}
|
2018-07-01 19:12:35 +02:00
|
|
|
|
2020-12-11 16:41:37 +01:00
|
|
|
ON_APPLICATION_REQUESTS_EXIT() {
|
2023-01-22 14:45:20 +01:00
|
|
|
stopFSIOThreads();
|
2020-12-11 16:41:37 +01:00
|
|
|
deinitLogging();
|
2018-07-01 19:12:35 +02:00
|
|
|
}
|