ScreenshotWUPS/src/main.cpp

56 lines
1.2 KiB
C++
Raw Normal View History

2020-12-11 16:41:37 +01:00
#include "main.h"
#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"
#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();
if (gEnabled) {
InitNotificationModule();
}
2018-07-01 19:12:35 +02:00
}
2023-01-22 16:38:23 +01:00
DEINITIALIZE_PLUGIN() {
NotificationModule_DeInitLibrary();
}
ON_ACQUIRED_FOREGROUND() {
InitDRCAttachCallbacks();
}
2020-12-11 16:41:37 +01:00
// Called whenever an application was started.
ON_APPLICATION_START() {
initLogging();
gShortNameEn = GetSanitizedNameOfCurrentApplication();
2023-01-22 14:45:20 +01:00
startFSIOThreads();
ApplyGameSpecificPatches();
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
}