mirror of
https://github.com/rwengine/openrw.git
synced 2024-09-18 16:32:32 +02:00
rwlib: do not include <Windows.h> in defines.hpp
This commit is contained in:
parent
d6ee4774d1
commit
91fc924a45
@ -2,4 +2,15 @@
|
|||||||
|
|
||||||
#if RW_DEBUG
|
#if RW_DEBUG
|
||||||
std::function<void()> _rw_abort_cb[2] = {nullptr, nullptr};
|
std::function<void()> _rw_abort_cb[2] = {nullptr, nullptr};
|
||||||
|
|
||||||
|
#if defined(RW_WINDOWS)
|
||||||
|
#define WINDOWS_LEAN_AND_MEAN
|
||||||
|
#include <Windows.h>
|
||||||
|
|
||||||
|
void WinBreak() {
|
||||||
|
DebugBreak();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -12,8 +12,8 @@ extern std::function<void()> _rw_abort_cb[2];
|
|||||||
#define RW_ASSERT(cond) do { if (!(cond)) RW_ABORT();} while (0)
|
#define RW_ASSERT(cond) do { if (!(cond)) RW_ABORT();} while (0)
|
||||||
|
|
||||||
#if defined(RW_WINDOWS)
|
#if defined(RW_WINDOWS)
|
||||||
#include <Windows.h>
|
void WinBreak();
|
||||||
#define RW_BREAKPOINT() DebugBreak()
|
#define RW_BREAKPOINT() WinBreak()
|
||||||
#else
|
#else
|
||||||
#include <csignal>
|
#include <csignal>
|
||||||
#define RW_BREAKPOINT() do { if(_rw_abort_cb[0]) _rw_abort_cb[0](); ::raise(SIGTRAP); if(_rw_abort_cb[1]) _rw_abort_cb[1](); } while (0)
|
#define RW_BREAKPOINT() do { if(_rw_abort_cb[0]) _rw_abort_cb[0](); ::raise(SIGTRAP); if(_rw_abort_cb[1]) _rw_abort_cb[1](); } while (0)
|
||||||
|
Loading…
Reference in New Issue
Block a user