mirror of
https://github.com/rwengine/openrw.git
synced 2024-09-15 06:52:34 +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
|
||||
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
|
||||
|
@ -12,8 +12,8 @@ extern std::function<void()> _rw_abort_cb[2];
|
||||
#define RW_ASSERT(cond) do { if (!(cond)) RW_ABORT();} while (0)
|
||||
|
||||
#if defined(RW_WINDOWS)
|
||||
#include <Windows.h>
|
||||
#define RW_BREAKPOINT() DebugBreak()
|
||||
void WinBreak();
|
||||
#define RW_BREAKPOINT() WinBreak()
|
||||
#else
|
||||
#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)
|
||||
|
Loading…
Reference in New Issue
Block a user