IOS7: Log error messages to the system error log facility
This commit is contained in:
parent
be6372df9c
commit
4efcecb986
2 changed files with 18 additions and 16 deletions
|
@ -352,22 +352,6 @@ void OSystem_iOS7::addSysArchivesToSearchSet(Common::SearchSet &s, int priority)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSystem_iOS7::logMessage(LogMessageType::Type type, const char *message) {
|
|
||||||
FILE *output = 0;
|
|
||||||
|
|
||||||
if (type == LogMessageType::kInfo || type == LogMessageType::kDebug)
|
|
||||||
output = stdout;
|
|
||||||
else
|
|
||||||
output = stderr;
|
|
||||||
|
|
||||||
if (type == LogMessageType::kError) {
|
|
||||||
_lastErrorMessage = message;
|
|
||||||
}
|
|
||||||
|
|
||||||
fputs(message, output);
|
|
||||||
fflush(output);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool iOS7_touchpadModeEnabled() {
|
bool iOS7_touchpadModeEnabled() {
|
||||||
OSystem_iOS7 *sys = (OSystem_iOS7 *) g_system;
|
OSystem_iOS7 *sys = (OSystem_iOS7 *) g_system;
|
||||||
return sys && sys->touchpadModeEnabled();
|
return sys && sys->touchpadModeEnabled();
|
||||||
|
|
|
@ -61,6 +61,24 @@ void OSystem_iOS7::fatalError() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OSystem_iOS7::logMessage(LogMessageType::Type type, const char *message) {
|
||||||
|
FILE *output = 0;
|
||||||
|
|
||||||
|
if (type == LogMessageType::kInfo || type == LogMessageType::kDebug)
|
||||||
|
output = stdout;
|
||||||
|
else
|
||||||
|
output = stderr;
|
||||||
|
|
||||||
|
if (type == LogMessageType::kError) {
|
||||||
|
_lastErrorMessage = message;
|
||||||
|
NSString *messageString = [NSString stringWithUTF8String:message];
|
||||||
|
NSLog(@"%@", messageString);
|
||||||
|
}
|
||||||
|
|
||||||
|
fputs(message, output);
|
||||||
|
fflush(output);
|
||||||
|
}
|
||||||
|
|
||||||
void OSystem_iOS7::engineInit() {
|
void OSystem_iOS7::engineInit() {
|
||||||
EventsBaseBackend::engineInit();
|
EventsBaseBackend::engineInit();
|
||||||
// Prevent the device going to sleep during game play (and in particular cut scenes)
|
// Prevent the device going to sleep during game play (and in particular cut scenes)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue