1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-11-22 18:26:39 +00:00

tasks: minor cleanup + declare global task pointers in header file.

This commit is contained in:
Pablo Curiel 2021-06-10 21:13:26 -04:00
parent 06676a0639
commit 04540643be
2 changed files with 15 additions and 14 deletions

View file

@ -120,4 +120,10 @@ namespace nxdt::tasks
}; };
} }
/* Declared in main.cpp. */
extern nxdt::tasks::GameCardTask *g_gamecardTask;
extern nxdt::tasks::TitleTask *g_titleTask;
extern nxdt::tasks::UmsTask *g_umsTask;
extern nxdt::tasks::UsbHostTask *g_usbHostTask;
#endif /* __TASKS_HPP__ */ #endif /* __TASKS_HPP__ */

View file

@ -17,11 +17,6 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <nxdt_utils.h> #include <nxdt_utils.h>
#include <tasks.hpp> #include <tasks.hpp>
#include <scope_guard.hpp> #include <scope_guard.hpp>
@ -44,12 +39,12 @@ std::vector<std::string> NOTIFICATIONS = {
"Hmm, Steamed Hams!" "Hmm, Steamed Hams!"
}; };
nxdt::tasks::GameCardTask *gc_task = nullptr; nxdt::tasks::GameCardTask *g_gamecardTask = nullptr;
nxdt::tasks::TitleTask *title_task = nullptr; nxdt::tasks::TitleTask *g_titleTask = nullptr;
nxdt::tasks::UmsTask *ums_task = nullptr; nxdt::tasks::UmsTask *g_umsTask = nullptr;
nxdt::tasks::UsbHostTask *usb_host_task = nullptr; nxdt::tasks::UsbHostTask *g_usbHostTask = nullptr;
int main(int argc, char* argv[]) int main(int argc, char *argv[])
{ {
ON_SCOPE_EXIT { utilsCloseResources(); }; ON_SCOPE_EXIT { utilsCloseResources(); };
@ -66,10 +61,10 @@ int main(int argc, char* argv[])
if (!brls::Application::init(APP_TITLE)) return EXIT_FAILURE; if (!brls::Application::init(APP_TITLE)) return EXIT_FAILURE;
/* Start background tasks. */ /* Start background tasks. */
gc_task = new nxdt::tasks::GameCardTask(); g_gamecardTask = new nxdt::tasks::GameCardTask();
title_task = new nxdt::tasks::TitleTask(); g_titleTask = new nxdt::tasks::TitleTask();
ums_task = new nxdt::tasks::UmsTask(); g_umsTask = new nxdt::tasks::UmsTask();
usb_host_task = new nxdt::tasks::UsbHostTask(); g_usbHostTask = new nxdt::tasks::UsbHostTask();
/* Create root tab frame. */ /* Create root tab frame. */
brls::TabFrame *root_frame = new brls::TabFrame(); brls::TabFrame *root_frame = new brls::TabFrame();