Fixed gamecube building.
This commit is contained in:
@@ -7,11 +7,13 @@
|
||||
|
||||
#include "log/log.h"
|
||||
#include "display/display.h"
|
||||
#include <debug.h>
|
||||
#include <fat.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef DUSK_WII
|
||||
#include <debug.h>
|
||||
#include <fat.h>
|
||||
|
||||
#define LOG_DEBUG_PATH "/apps/Dusk/debug.log"
|
||||
#define LOG_ERROR_PATH "/apps/Dusk/error.log"
|
||||
|
||||
@@ -23,6 +25,7 @@ static void logInitFAT(void) {
|
||||
fatTried = true;
|
||||
fatReady = fatInitDefault();
|
||||
}
|
||||
#endif
|
||||
|
||||
void logDebug(const char_t *message, ...) {
|
||||
va_list args;
|
||||
@@ -35,6 +38,7 @@ void logDebug(const char_t *message, ...) {
|
||||
va_end(copy);
|
||||
fflush(stdout);
|
||||
|
||||
#ifdef DUSK_WII
|
||||
// Print to file
|
||||
logInitFAT();
|
||||
if(fatReady) {
|
||||
@@ -46,6 +50,7 @@ void logDebug(const char_t *message, ...) {
|
||||
fclose(file);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
va_end(args);
|
||||
}
|
||||
@@ -55,6 +60,7 @@ void logError(const char_t *message, ...) {
|
||||
va_start(args, message);
|
||||
|
||||
// Write to file before displaying on screen
|
||||
#ifdef DUSK_WII
|
||||
logInitFAT();
|
||||
if(fatReady) {
|
||||
FILE *file = fopen(LOG_ERROR_PATH, "a");
|
||||
@@ -66,6 +72,8 @@ void logError(const char_t *message, ...) {
|
||||
fclose(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Either create graphics, or hijack the displays' graphics.
|
||||
GXRModeObj *rmode = NULL;
|
||||
|
||||
Reference in New Issue
Block a user