diff options
author | RSDuck <rsduck@users.noreply.github.com> | 2019-06-22 01:28:32 +0200 |
---|---|---|
committer | RSDuck <rsduck@users.noreply.github.com> | 2020-06-16 11:53:05 +0200 |
commit | c692287ebab4dfdec16bb0a8ce338a4b6fe2d439 (patch) | |
tree | 227ef520beebbe860696a06948a6d95570f9741e /src/dolphin/Assert.h | |
parent | aa6ff499f98dfbb5ca9aa8cac27fed813684eb45 (diff) |
JIT: base
all instructions are interpreted
Diffstat (limited to 'src/dolphin/Assert.h')
-rw-r--r-- | src/dolphin/Assert.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/dolphin/Assert.h b/src/dolphin/Assert.h new file mode 100644 index 0000000..4eb16e0 --- /dev/null +++ b/src/dolphin/Assert.h @@ -0,0 +1,47 @@ +// Copyright 2015 Dolphin Emulator Project +// Licensed under GPLv2+ +// Refer to the license_dolphin.txt file included. + +#pragma once + +#include <assert.h> + +#define ASSERT_MSG(_t_, _a_, _fmt_, ...) \ + assert(_a_) \ + /*do \ + { \ + if (!(_a_)) \ + { \ + if (!PanicYesNo(_fmt_, ##__VA_ARGS__)) \ + Crash(); \ + } \ + } while (0)*/ + +#define DEBUG_ASSERT_MSG(_t_, _a_, _msg_, ...) \ + assert(_a_); \ + /*do \ + { \ + if (MAX_LOGLEVEL >= LogTypes::LOG_LEVELS::LDEBUG && !(_a_)) \ + { \ + ERROR_LOG(_t_, _msg_, ##__VA_ARGS__); \ + if (!PanicYesNo(_msg_, ##__VA_ARGS__)) \ + Crash(); \ + } \ + } while (0)*/ + +#define ASSERT(_a_) \ + assert(_a_) \ + /*do \ + { \ + ASSERT_MSG(MASTER_LOG, _a_, \ + _trans("An error occurred.\n\n Line: %d\n File: %s\n\nIgnore and continue?"), \ + __LINE__, __FILE__); \ + } while (0)*/ + +#define DEBUG_ASSERT(_a_) \ + assert(_a_) \ + /*do \ + { \ + if (MAX_LOGLEVEL >= LogTypes::LOG_LEVELS::LDEBUG) \ + ASSERT(_a_); \ + } while (0)*/ |