diff --git a/include/tasks.hpp b/include/tasks.hpp index 0e9be9d..b8243a7 100644 --- a/include/tasks.hpp +++ b/include/tasks.hpp @@ -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__ */ diff --git a/source/main.cpp b/source/main.cpp index 28f1f44..ba0fb9c 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -17,11 +17,6 @@ along with this program. If not, see . */ -#include -#include - -#include - #include #include #include @@ -44,12 +39,12 @@ std::vector NOTIFICATIONS = { "Hmm, Steamed Hams!" }; -nxdt::tasks::GameCardTask *gc_task = nullptr; -nxdt::tasks::TitleTask *title_task = nullptr; -nxdt::tasks::UmsTask *ums_task = nullptr; -nxdt::tasks::UsbHostTask *usb_host_task = nullptr; +nxdt::tasks::GameCardTask *g_gamecardTask = nullptr; +nxdt::tasks::TitleTask *g_titleTask = nullptr; +nxdt::tasks::UmsTask *g_umsTask = nullptr; +nxdt::tasks::UsbHostTask *g_usbHostTask = nullptr; -int main(int argc, char* argv[]) +int main(int argc, char *argv[]) { ON_SCOPE_EXIT { utilsCloseResources(); }; @@ -66,10 +61,10 @@ int main(int argc, char* argv[]) if (!brls::Application::init(APP_TITLE)) return EXIT_FAILURE; /* Start background tasks. */ - gc_task = new nxdt::tasks::GameCardTask(); - title_task = new nxdt::tasks::TitleTask(); - ums_task = new nxdt::tasks::UmsTask(); - usb_host_task = new nxdt::tasks::UsbHostTask(); + g_gamecardTask = new nxdt::tasks::GameCardTask(); + g_titleTask = new nxdt::tasks::TitleTask(); + g_umsTask = new nxdt::tasks::UmsTask(); + g_usbHostTask = new nxdt::tasks::UsbHostTask(); /* Create root tab frame. */ brls::TabFrame *root_frame = new brls::TabFrame();