summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Src/MsgHandler.cpp
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2008-12-25 15:56:36 +0000
committerhrydgard <hrydgard@gmail.com>2008-12-25 15:56:36 +0000
commitdcc48d6c417192dec95aa0d0562d6cc2f3cfa18a (patch)
treef64ccb07691d1df7c508403421655d882086b49d /Source/Core/Common/Src/MsgHandler.cpp
parent3fd665502e7956ebd97391c0f4cc907d70358968 (diff)
just a bunch of random code cleanup i did on the train bored, plus a d3d implementation of NativeVertexFormat which isn't actually used yet.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1658 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common/Src/MsgHandler.cpp')
-rw-r--r--Source/Core/Common/Src/MsgHandler.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/Source/Core/Common/Src/MsgHandler.cpp b/Source/Core/Common/Src/MsgHandler.cpp
index 9485c31b23..c3a9cae59d 100644
--- a/Source/Core/Common/Src/MsgHandler.cpp
+++ b/Source/Core/Common/Src/MsgHandler.cpp
@@ -24,44 +24,44 @@ bool DefaultMsgHandler(const char* caption, const char* text, bool yes_no);
static MsgAlertHandler msg_handler = DefaultMsgHandler;
-void RegisterMsgAlertHandler(MsgAlertHandler handler) {
- msg_handler = handler;
+void RegisterMsgAlertHandler(MsgAlertHandler handler)
+{
+ msg_handler = handler;
}
-bool MsgAlert(const char* caption, bool yes_no,
- const char* format, ...) {
-
- char buffer[2048];
- va_list args;
- bool ret = false;
+bool MsgAlert(const char* caption, bool yes_no, const char* format, ...)
+{
+ char buffer[2048];
+ va_list args;
+ bool ret = false;
- va_start(args, format);
- CharArrayFromFormatV(buffer, 2048, format, args);
+ va_start(args, format);
+ CharArrayFromFormatV(buffer, 2048, format, args);
- LOG(MASTER_LOG, "%s: %s", caption, buffer);
+ LOG(MASTER_LOG, "%s: %s", caption, buffer);
- if (msg_handler) {
- ret = msg_handler(caption, buffer, yes_no);
- }
-
- va_end(args);
- return ret;
-}
+ if (msg_handler)
+ {
+ ret = msg_handler(caption, buffer, yes_no);
+ }
-bool DefaultMsgHandler(const char* caption, const char* text,
- bool yes_no) {
+ va_end(args);
+ return ret;
+}
+bool DefaultMsgHandler(const char* caption, const char* text, bool yes_no)
+{
#ifdef _WIN32
- if (yes_no)
- return IDYES == MessageBox(0, text, caption,
- MB_ICONQUESTION | MB_YESNO);
- else {
- MessageBox(0, text, caption, MB_ICONWARNING);
- return true;
- }
+ if (yes_no)
+ return IDYES == MessageBox(0, text, caption,
+ MB_ICONQUESTION | MB_YESNO);
+ else {
+ MessageBox(0, text, caption, MB_ICONWARNING);
+ return true;
+ }
#else
- printf("%s\n", text);
- return true;
+ printf("%s\n", text);
+ return true;
#endif
}