[Scummvm-cvs-logs] scummvm master -> 158c2252ab4fea7fd9ecea62a2439d82b388df1c
fingolfin
max at quendi.de
Fri Jun 17 21:18:06 CEST 2011
This automated email contains information about 8 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
4aa66fa5aa PSP: Make logMessage() implementation independent from parent class(es)
50896e6029 WII: Add logMessage() implementation
c06ddf2e57 IPHONE: Add logMessage() implementation
263e23bd81 N64: Add logMessage() implementation
7607a077fe NULL: Add logMessage() implementation
3599d07087 SDL: Make logMessage() implementation independent from parent class(es)
f7c1e7d002 COMMON: Remove default implementation of OSystem::logMessage
158c2252ab Merge pull request #42 from fingolfin/no-osystem-defaults
Commit: 4aa66fa5aa337c7aef7d20013f776168042d45f0
https://github.com/scummvm/scummvm/commit/4aa66fa5aa337c7aef7d20013f776168042d45f0
Author: Max Horn (max at quendi.de)
Date: 2011-06-17T11:50:30-07:00
Commit Message:
PSP: Make logMessage() implementation independent from parent class(es)
Changed paths:
backends/platform/psp/osys_psp.cpp
diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp
index 01124b4..8c8180d 100644
--- a/backends/platform/psp/osys_psp.cpp
+++ b/backends/platform/psp/osys_psp.cpp
@@ -20,8 +20,7 @@
*
*/
-// Allow use of stuff in <time.h>
-#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include <pspuser.h>
#include <pspgu.h>
@@ -422,7 +421,15 @@ void OSystem_PSP::quit() {
}
void OSystem_PSP::logMessage(LogMessageType::Type type, const char *message) {
- EventsBaseBackend::logMessage(type, message);
+ FILE *output = 0;
+
+ if (type == LogMessageType::kInfo || type == LogMessageType::kDebug)
+ output = stdout;
+ else
+ output = stderr;
+
+ fputs(message, output);
+ fflush(output);
if (type == LogMessageType::kError)
PspDebugTrace(false, "%s", message); // write to file
Commit: 50896e6029076c6c5087cb2d3a918f7545b47008
https://github.com/scummvm/scummvm/commit/50896e6029076c6c5087cb2d3a918f7545b47008
Author: Max Horn (max at quendi.de)
Date: 2011-06-17T11:50:37-07:00
Commit Message:
WII: Add logMessage() implementation
Changed paths:
backends/platform/wii/osystem.cpp
backends/platform/wii/osystem.h
diff --git a/backends/platform/wii/osystem.cpp b/backends/platform/wii/osystem.cpp
index c6b2378..258a782 100644
--- a/backends/platform/wii/osystem.cpp
+++ b/backends/platform/wii/osystem.cpp
@@ -19,11 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-// Allow use of stuff in <time.h>
-#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
-
-#define FORBIDDEN_SYMBOL_EXCEPTION_printf
-#define FORBIDDEN_SYMBOL_EXCEPTION_getcwd
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include <unistd.h>
@@ -291,6 +287,18 @@ void OSystem_Wii::showOptionsDialog() {
_padAcceleration = 9 - ConfMan.getInt("wii_pad_acceleration");
}
+void OSystem_Wii::logMessage(LogMessageType::Type type, const char *message) {
+ FILE *output = 0;
+
+ if (type == LogMessageType::kInfo || type == LogMessageType::kDebug)
+ output = stdout;
+ else
+ output = stderr;
+
+ fputs(message, output);
+ fflush(output);
+}
+
#ifndef GAMECUBE
Common::String OSystem_Wii::getSystemLanguage() const {
const char *wiiCountries[] = {
diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h
index 6863a68..64197f9 100644
--- a/backends/platform/wii/osystem.h
+++ b/backends/platform/wii/osystem.h
@@ -211,6 +211,8 @@ public:
virtual FilesystemFactory *getFilesystemFactory();
virtual void getTimeAndDate(TimeDate &t) const;
+ virtual void logMessage(LogMessageType::Type type, const char *message);
+
#ifndef GAMECUBE
virtual Common::String getSystemLanguage() const;
#endif // GAMECUBE
Commit: c06ddf2e57ac7247c6a944212f6aea923c03364c
https://github.com/scummvm/scummvm/commit/c06ddf2e57ac7247c6a944212f6aea923c03364c
Author: Max Horn (max at quendi.de)
Date: 2011-06-17T11:50:37-07:00
Commit Message:
IPHONE: Add logMessage() implementation
Changed paths:
backends/platform/iphone/osys_main.cpp
backends/platform/iphone/osys_main.h
diff --git a/backends/platform/iphone/osys_main.cpp b/backends/platform/iphone/osys_main.cpp
index 9325ed5..4bc567c 100644
--- a/backends/platform/iphone/osys_main.cpp
+++ b/backends/platform/iphone/osys_main.cpp
@@ -242,6 +242,18 @@ void OSystem_IPHONE::addSysArchivesToSearchSet(Common::SearchSet &s, int priorit
}
}
+void OSystem_IPHONE::logMessage(LogMessageType::Type type, const char *message) {
+ FILE *output = 0;
+
+ if (type == LogMessageType::kInfo || type == LogMessageType::kDebug)
+ output = stdout;
+ else
+ output = stderr;
+
+ fputs(message, output);
+ fflush(output);
+}
+
void iphone_main(int argc, char *argv[]) {
//OSystem_IPHONE::migrateApp();
diff --git a/backends/platform/iphone/osys_main.h b/backends/platform/iphone/osys_main.h
index 14325f8..37896cc 100644
--- a/backends/platform/iphone/osys_main.h
+++ b/backends/platform/iphone/osys_main.h
@@ -180,6 +180,8 @@ public:
virtual Common::String getDefaultConfigFileName();
+ virtual void logMessage(LogMessageType::Type type, const char *message);
+
protected:
void internUpdateScreen();
void dirtyFullScreen();
Commit: 263e23bd810a87bf76023948923a5bb7c203ac2c
https://github.com/scummvm/scummvm/commit/263e23bd810a87bf76023948923a5bb7c203ac2c
Author: Max Horn (max at quendi.de)
Date: 2011-06-17T11:50:37-07:00
Commit Message:
N64: Add logMessage() implementation
Changed paths:
backends/platform/n64/osys_n64.h
backends/platform/n64/osys_n64_base.cpp
diff --git a/backends/platform/n64/osys_n64.h b/backends/platform/n64/osys_n64.h
index dfa8f58..285e2af 100644
--- a/backends/platform/n64/osys_n64.h
+++ b/backends/platform/n64/osys_n64.h
@@ -199,6 +199,7 @@ public:
virtual Audio::Mixer *getMixer();
virtual void getTimeAndDate(TimeDate &t) const;
virtual void setTimerCallback(TimerProc callback, int interval);
+ virtual void logMessage(LogMessageType::Type type, const char *message);
void rebuildOffscreenGameBuffer(void);
void rebuildOffscreenMouseBuffer(void);
diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp
index 69e8da3..4bc3780 100644
--- a/backends/platform/n64/osys_n64_base.cpp
+++ b/backends/platform/n64/osys_n64_base.cpp
@@ -870,6 +870,18 @@ void OSystem_N64::getTimeAndDate(TimeDate &t) const {
return;
}
+void OSystem_N64::logMessage(LogMessageType::Type type, const char *message) {
+ FILE *output = 0;
+
+ if (type == LogMessageType::kInfo || type == LogMessageType::kDebug)
+ output = stdout;
+ else
+ output = stderr;
+
+ fputs(message, output);
+ fflush(output);
+}
+
void OSystem_N64::setTimerCallback(TimerProc callback, int interval) {
assert (interval > 0);
Commit: 7607a077fe589c2cdbdd587ba4c6285f1134c422
https://github.com/scummvm/scummvm/commit/7607a077fe589c2cdbdd587ba4c6285f1134c422
Author: Max Horn (max at quendi.de)
Date: 2011-06-17T11:50:38-07:00
Commit Message:
NULL: Add logMessage() implementation
Changed paths:
backends/platform/null/null.cpp
diff --git a/backends/platform/null/null.cpp b/backends/platform/null/null.cpp
index 106cde1..4690a67 100644
--- a/backends/platform/null/null.cpp
+++ b/backends/platform/null/null.cpp
@@ -52,6 +52,8 @@ public:
virtual uint32 getMillis();
virtual void delayMillis(uint msecs);
virtual void getTimeAndDate(TimeDate &t) const {}
+
+ virtual void logMessage(LogMessageType::Type type, const char *message);
};
OSystem_NULL::OSystem_NULL() {
@@ -97,6 +99,18 @@ uint32 OSystem_NULL::getMillis() {
void OSystem_NULL::delayMillis(uint msecs) {
}
+void OSystem_NULL::logMessage(LogMessageType::Type type, const char *message) {
+ FILE *output = 0;
+
+ if (type == LogMessageType::kInfo || type == LogMessageType::kDebug)
+ output = stdout;
+ else
+ output = stderr;
+
+ fputs(message, output);
+ fflush(output);
+}
+
OSystem *OSystem_NULL_create() {
return new OSystem_NULL();
}
Commit: 3599d0708709b9f434c96b9922024a8b87361fb0
https://github.com/scummvm/scummvm/commit/3599d0708709b9f434c96b9922024a8b87361fb0
Author: Max Horn (max at quendi.de)
Date: 2011-06-17T11:50:38-07:00
Commit Message:
SDL: Make logMessage() implementation independent from parent class(es)
Changed paths:
backends/platform/sdl/sdl.cpp
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index fd27c82..e36878d 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -275,10 +275,22 @@ void OSystem_SDL::fatalError() {
void OSystem_SDL::logMessage(LogMessageType::Type type, const char *message) {
- ModularBackend::logMessage(type, message);
+ // First log to stdout/stderr
+ FILE *output = 0;
+
+ if (type == LogMessageType::kInfo || type == LogMessageType::kDebug)
+ output = stdout;
+ else
+ output = stderr;
+
+ fputs(message, output);
+ fflush(output);
+
+ // Then log into file (via the logger)
if (_logger)
_logger->print(message);
+ // Finally, some Windows / WinCE specific logging code.
#if defined( USE_WINDBG )
#if defined( _WIN32_WCE )
TCHAR buf_unicode[1024];
Commit: f7c1e7d002c21eeaf0b5c06d3527ede532f5cd51
https://github.com/scummvm/scummvm/commit/f7c1e7d002c21eeaf0b5c06d3527ede532f5cd51
Author: Max Horn (max at quendi.de)
Date: 2011-06-17T11:50:41-07:00
Commit Message:
COMMON: Remove default implementation of OSystem::logMessage
Changed paths:
common/system.cpp
common/system.h
diff --git a/common/system.cpp b/common/system.cpp
index fae7a3e..1645a6b 100644
--- a/common/system.cpp
+++ b/common/system.cpp
@@ -21,11 +21,6 @@
*/
#define FORBIDDEN_SYMBOL_EXCEPTION_exit
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
-#define FORBIDDEN_SYMBOL_EXCEPTION_fputs
-#define FORBIDDEN_SYMBOL_EXCEPTION_fflush
-#define FORBIDDEN_SYMBOL_EXCEPTION_stdout
-#define FORBIDDEN_SYMBOL_EXCEPTION_stderr
#include "common/system.h"
#include "common/events.h"
@@ -136,20 +131,6 @@ Common::String OSystem::getDefaultConfigFileName() {
return "scummvm.ini";
}
-void OSystem::logMessage(LogMessageType::Type type, const char *message) {
-#if !defined(__PLAYSTATION2__) && !defined(__DS__)
- FILE *output = 0;
-
- if (type == LogMessageType::kInfo || type == LogMessageType::kDebug)
- output = stdout;
- else
- output = stderr;
-
- fputs(message, output);
- fflush(output);
-#endif
-}
-
Common::String OSystem::getSystemLanguage() const {
return "en_US";
}
diff --git a/common/system.h b/common/system.h
index d26bc59..3e740ff 100644
--- a/common/system.h
+++ b/common/system.h
@@ -1101,7 +1101,7 @@ public:
* @param type the type of the message
* @param message the message itself
*/
- virtual void logMessage(LogMessageType::Type type, const char *message);
+ virtual void logMessage(LogMessageType::Type type, const char *message) = 0;
/**
* Open the log file in a way that allows the user to review it,
Commit: 158c2252ab4fea7fd9ecea62a2439d82b388df1c
https://github.com/scummvm/scummvm/commit/158c2252ab4fea7fd9ecea62a2439d82b388df1c
Author: Max Horn (max at quendi.de)
Date: 2011-06-17T12:16:18-07:00
Commit Message:
Merge pull request #42 from fingolfin/no-osystem-defaults
Remove default implementation of OSystem::logMessage
Changed paths:
backends/platform/iphone/osys_main.cpp
backends/platform/iphone/osys_main.h
backends/platform/n64/osys_n64.h
backends/platform/n64/osys_n64_base.cpp
backends/platform/null/null.cpp
backends/platform/psp/osys_psp.cpp
backends/platform/sdl/sdl.cpp
backends/platform/wii/osystem.cpp
backends/platform/wii/osystem.h
common/system.cpp
common/system.h
More information about the Scummvm-git-logs
mailing list