Add IsDebuggerPresent

This commit is contained in:
Krzosa Karol
2026-01-05 12:03:25 +01:00
parent 96d9847639
commit c0d00a6211
4 changed files with 13 additions and 4 deletions

View File

@@ -8,6 +8,7 @@
- Macros
- ctrl-e started doing no-ops again ... ??
- Window position: vscode opens in fullscreen and then remembers what position it was close in (could be a config option)
- On Linux: Try to implement is_debugger_present()
- OnUpdate view hooks!
- OnSave buffer hooks which will execute the config on save

View File

@@ -77,7 +77,14 @@
#endif
#if OS_WINDOWS
#define BREAK() __debugbreak()
#ifndef NOMINMAX
#define NOMINMAX
#endif
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#define BREAK() if (IsDebuggerPresent()) {__debugbreak();}
#elif OS_LINUX
#define BREAK() raise(SIGTRAP)
#elif OS_WASM

View File

@@ -282,11 +282,8 @@ void TestParser() {
ok = MatchEvent(trigger, &event);
Assert(!ok);
}
} RegisterFunction(&TestFunctions, TestParser);
void CMD_OpenConfig() {
Buffer *buffer = GetBuffer(GlobalConfigBufferID);
Open(buffer->name);

View File

@@ -8,7 +8,11 @@ bool WaitForEventsState = true;
bool RunGCThisFrame;
bool SearchCaseSensitive = false;
bool SearchWordBoundary = false;
#if OS_WINDOWS
bool BreakOnError = true;
#else
bool BreakOnError = false;
#endif
WindowID WindowIDs;
ViewID ViewIDs;