diff options
Diffstat (limited to 'gtk/PlatGTK.cxx')
-rw-r--r-- | gtk/PlatGTK.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index f9141255e..5276d75f2 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -864,6 +864,21 @@ void Platform::DebugPrintf(const char *, ...) { } #endif +// Not supported for GTK+ +static bool assertionPopUps = true; + +void Platform::ShowAssertionPopUps(bool assertionPopUps_) { + assertionPopUps = assertionPopUps_; +} + +void Platform::Assert(const char *c, const char *file, int line) { + char buffer[2000]; + sprintf(buffer, "Assertion [%s] failed at %s %d", c, file, line); + strcat(buffer, "\r\n"); + Platform::DebugDisplay(buffer); + abort(); +} + int Platform::Clamp(int val, int minVal, int maxVal) { if (val > maxVal) val = maxVal; |