summaryrefslogtreecommitdiff
path: root/Source/Core/Common
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2009-05-03 11:15:17 +0000
committerhrydgard <hrydgard@gmail.com>2009-05-03 11:15:17 +0000
commit0772db6af6f35c700c6ff169bc94bef13d9b8cb7 (patch)
treed04f72f205695cd4f0b068894b3a3959452c82f9 /Source/Core/Common
parent90ae2a8e55362bc06867ba8d44a39818b7aa31b9 (diff)
DSP: add a crazy little shell script that will build DSPCore into DSPSpy. make DSPCore build in gekko mode. re-add GC-pad controls to DSPSpy (now it can run inside Dolphin, kind of neat but not super useful for the obvious reasons).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3141 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common')
-rw-r--r--Source/Core/Common/Src/CommonFuncs.h6
-rw-r--r--Source/Core/Common/Src/Log.h10
-rw-r--r--Source/Core/Common/Src/MsgHandler.h8
3 files changed, 23 insertions, 1 deletions
diff --git a/Source/Core/Common/Src/CommonFuncs.h b/Source/Core/Common/Src/CommonFuncs.h
index d71e9fe24d..4f128c4726 100644
--- a/Source/Core/Common/Src/CommonFuncs.h
+++ b/Source/Core/Common/Src/CommonFuncs.h
@@ -36,7 +36,11 @@ size_t strnlen(const char *s, size_t n);
#endif // APPLE
#include <errno.h>
// go to debugger mode
- #define Crash() {asm ("int $3");}
+ #ifdef GEKKO
+ #define Crash()
+ #else
+ #define Crash() {asm ("int $3");}
+ #endif
#define ARRAYSIZE(A) (sizeof(A)/sizeof((A)[0]))
inline u32 _rotl(u32 x, int shift) {
shift &= 31;
diff --git a/Source/Core/Common/Src/Log.h b/Source/Core/Common/Src/Log.h
index a9f2833d07..e607c464c5 100644
--- a/Source/Core/Common/Src/Log.h
+++ b/Source/Core/Common/Src/Log.h
@@ -103,8 +103,13 @@ enum LOG_LEVELS {
// FIXME can we get rid of this?
#include "LogManager.h"
+#ifdef GEKKO
+#define GENERIC_LOG(t, v, ...)
+#else
+
// Let the compiler optimize this out
#define GENERIC_LOG(t, v, ...) {if (v <= MAX_LOGLEVEL) {LogManager::GetInstance()->Log(v, t, __VA_ARGS__);}}
+#endif
#if MAX_LOGLEVEL >= ERROR_LEVEL
#undef ERROR_LOG
@@ -155,6 +160,8 @@ enum LOG_LEVELS {
#endif // MAX_LOGLEVEL DEBUG
#define _assert_(_a_) _dbg_assert_(MASTER_LOG, _a_)
+
+#ifndef GEKKO
#ifdef _WIN32
#define _assert_msg_(_t_, _a_, _fmt_, ...) \
if (!(_a_)) {\
@@ -166,5 +173,8 @@ enum LOG_LEVELS {
if (!PanicYesNo(_fmt_, ##__VA_ARGS__)) {Crash();} \
}
#endif // WIN32
+#else // GEKKO
+#define _assert_msg_(_t_, _a_, _fmt_, ...)
+#endif
#endif // _LOG_H_
diff --git a/Source/Core/Common/Src/MsgHandler.h b/Source/Core/Common/Src/MsgHandler.h
index fe9322f6ef..d128b0233c 100644
--- a/Source/Core/Common/Src/MsgHandler.h
+++ b/Source/Core/Common/Src/MsgHandler.h
@@ -31,6 +31,7 @@ void RegisterMsgAlertHandler(MsgAlertHandler handler);
extern bool MsgAlert(const char* caption, bool yes_no, int Style, const char* format, ...);
void SetEnableAlert(bool enable);
+#ifndef GEKKO
#ifdef _WIN32
#define SuccessAlert(format, ...) MsgAlert("Information", false, INFORMATION, format, __VA_ARGS__)
#define PanicAlert(format, ...) MsgAlert("Warning", false, WARNING, format, __VA_ARGS__)
@@ -42,5 +43,12 @@ void SetEnableAlert(bool enable);
#define PanicYesNo(format, ...) MsgAlert("Warning", true, WARNING, format, ##__VA_ARGS__)
#define AskYesNo(format, ...) MsgAlert("Question", true, QUESTION, format, ##__VA_ARGS__)
#endif
+#else
+// GEKKO
+ #define SuccessAlert(format, ...) ;
+ #define PanicAlert(format, ...) ;
+ #define PanicYesNo(format, ...) ;
+ #define AskYesNo(format, ...) ;
+#endif
#endif // _MSGHANDLER_H_