summaryrefslogtreecommitdiff
path: root/src/common/log.h
diff options
context:
space:
mode:
authorGravatar archshift2015-01-20 17:16:47 -0800
committerGravatar archshift2015-02-10 18:30:31 -0800
commitef24e72b2618806f64345544fa46c84f3f494890 (patch)
treefca138e8377c4d66bd1fe026a3d2fef54a7f090c /src/common/log.h
parentGSP: Fixed typo in SignalInterrupt (diff)
downloadyuzu-ef24e72b2618806f64345544fa46c84f3f494890.tar.gz
yuzu-ef24e72b2618806f64345544fa46c84f3f494890.tar.xz
yuzu-ef24e72b2618806f64345544fa46c84f3f494890.zip
Asserts: break/crash program, fit to style guide; log.h->assert.h
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time) As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing) Also removed some GEKKO cruft.
Diffstat (limited to 'src/common/log.h')
-rw-r--r--src/common/log.h56
1 files changed, 0 insertions, 56 deletions
diff --git a/src/common/log.h b/src/common/log.h
deleted file mode 100644
index b397cf14d..000000000
--- a/src/common/log.h
+++ /dev/null
@@ -1,56 +0,0 @@
1// Copyright 2013 Dolphin Emulator Project / 2014 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "common/common_funcs.h"
8#include "common/msg_handler.h"
9#include "common/logging/log.h"
10
11#ifdef _MSC_VER
12#ifndef __func__
13#define __func__ __FUNCTION__
14#endif
15#endif
16
17#ifdef _DEBUG
18#define _dbg_assert_(_t_, _a_) \
19 if (!(_a_)) {\
20 LOG_CRITICAL(_t_, "Error...\n\n Line: %d\n File: %s\n Time: %s\n\nIgnore and continue?", \
21 __LINE__, __FILE__, __TIME__); \
22 if (!PanicYesNo("*** Assertion (see log)***\n")) {Crash();} \
23 }
24#define _dbg_assert_msg_(_t_, _a_, ...)\
25 if (!(_a_)) {\
26 LOG_CRITICAL(_t_, __VA_ARGS__); \
27 if (!PanicYesNo(__VA_ARGS__)) {Crash();} \
28 }
29#define _dbg_update_() Host_UpdateLogDisplay();
30
31#else // not debug
32#define _dbg_update_() ;
33
34#ifndef _dbg_assert_
35#define _dbg_assert_(_t_, _a_) {}
36#define _dbg_assert_msg_(_t_, _a_, _desc_, ...) {}
37#endif // dbg_assert
38#endif
39
40#define _assert_(_a_) _dbg_assert_(MASTER_LOG, _a_)
41
42#ifndef GEKKO
43#ifdef _MSC_VER
44#define _assert_msg_(_t_, _a_, _fmt_, ...) \
45 if (!(_a_)) {\
46 if (!PanicYesNo(_fmt_, __VA_ARGS__)) {Crash();} \
47 }
48#else // not msvc
49#define _assert_msg_(_t_, _a_, _fmt_, ...) \
50 if (!(_a_)) {\
51 if (!PanicYesNo(_fmt_, ##__VA_ARGS__)) {Crash();} \
52 }
53#endif // _WIN32
54#else // GEKKO
55#define _assert_msg_(_t_, _a_, _fmt_, ...)
56#endif \ No newline at end of file