[Loader] Added serveral minor clean ups.

This commit is contained in:
Maschell 2018-04-04 15:36:57 +02:00
parent a8d1960dc3
commit 60e49ea83f
5 changed files with 12 additions and 9 deletions

View File

@ -55,7 +55,7 @@ INCLUDES := src/libelf \
# options for code generation
#---------------------------------------------------------------------------------
CFLAGS := -std=gnu11 -mrvl -mcpu=750 -meabi -mhard-float -ffast-math \
-O0 -D__wiiu__ -Wall -Wextra -Wno-unused-parameter -Wno-strict-aliasing $(INCLUDE)
-O0 -D__wiiu__ -Wall -Wextra -Wno-unused-parameter -Wno-strict-aliasing -D_GNU_SOURCE $(INCLUDE)
CXXFLAGS := -std=gnu++11 -mrvl -mcpu=750 -meabi -mhard-float -ffast-math \
-O0 -D__wiiu__ -Wall -Wextra -Wno-unused-parameter -Wno-strict-aliasing -D_GNU_SOURCE $(INCLUDE)

View File

@ -68,6 +68,7 @@ Application::~Application() {
DEBUG_FUNCTION_LINE("Triggering AsyncDeleter\n");
AsyncDeleter::triggerDeleteProcess();
while(!AsyncDeleter::realListEmpty()) {
DEBUG_FUNCTION_LINE("Waiting...\n");
os_usleep(1000);
}
} while(!AsyncDeleter::deleteListEmpty());
@ -78,7 +79,6 @@ Application::~Application() {
DEBUG_FUNCTION_LINE("Stop sound handler\n");
SoundHandler::DestroyInstance();
}
s32 Application::exec() {
@ -159,6 +159,7 @@ void Application::executeThread(void) {
bgMusic->Stop(); //CHANG MEEEEEEEEEEEEEEEEEEE
}
while(reloadUIflag) {
reloadUIflag = false;
exitCode = EXIT_RELAUNCH_ON_LOAD;
@ -167,11 +168,12 @@ void Application::executeThread(void) {
DEBUG_FUNCTION_LINE("Initialize main window\n");
mainWindow = MainWindow::getInstance(video->getTvWidth(), video->getTvHeight());
DEBUG_FUNCTION_LINE("Entering main loop\n");
exitApplication = false;
//! main GX2 loop (60 Hz cycle with max priority on core 1)
DEBUG_FUNCTION_LINE("Starting TcpReceiver\n");
TcpReceiver pluginReceiver(4299);
DEBUG_FUNCTION_LINE("Entering main loop\n");
while(!exitApplication && !reloadUIflag) {
//! Read out inputs
for(s32 i = 0; i < 5; i++) {
@ -209,6 +211,7 @@ void Application::executeThread(void) {
video->drcEnable(true);
}
//! as last point update the effects as it can drop elements
mainWindow->updateEffects();
@ -219,9 +222,9 @@ void Application::executeThread(void) {
//! and avoid blocking the GUI thread
AsyncDeleter::triggerDeleteProcess();
}
DEBUG_FUNCTION_LINE("fadeOut\n");
DEBUG_FUNCTION_LINE("Fading out\n");
fadeOut();
DEBUG_FUNCTION_LINE("MainWindow::destroyInstance();\n");
DEBUG_FUNCTION_LINE("Destroying the MainWindow\n");
MainWindow::destroyInstance();
}
DEBUG_FUNCTION_LINE("Delete fontSystem\n");

View File

@ -42,12 +42,12 @@ std::vector<PluginInformation *> PluginLoader::getPluginInformation(const char *
DIR *dfd = NULL;
if(path == NULL) {
DEBUG_FUNCTION_LINE("Path was NULL");
DEBUG_FUNCTION_LINE("Path was NULL\n");
return result;
}
if ((dfd = opendir(path)) == NULL) {
DEBUG_FUNCTION_LINE("Couldn't open dir %s",path);
DEBUG_FUNCTION_LINE("Couldn't open dir %s\n",path);
return result;
}

View File

@ -49,7 +49,7 @@ class PluginLoader {
public:
static PluginLoader *getInstance() {
if(!instance) {
instance = new PluginLoader((void*)getApplicationEndAddr(),(void *)PLUGIN_LOCATION_END_ADDRESS);
instance = new PluginLoader((void*)getApplicationEndAddr(),(void *)PLUGIN_LOCATION_END_ADDRESS);
}
return instance;
}

View File

@ -71,7 +71,7 @@ bool CSettings::Load() {
std::string filepath = configPath;
filepath += CONFIG_FILENAME;
log_printf("CSettings::Load(line %d): Loading Configuration from %s\n",__LINE__,filepath.c_str());
DEBUG_FUNCTION_LINE("Loading Configuration from %s\n",filepath.c_str());
CFile file(filepath, CFile::ReadOnly);
if (!file.isOpen())