Skip to content

Commit

Permalink
use error dialogs on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
marekmaskarinec committed Apr 13, 2022
1 parent f76f484 commit 982c953
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@ void th_error(char *text, ...) {

va_list args;
va_start(args, text);
#ifdef _WIN32
#include <winuser.h>
char buf[4096];
vsnprintf(buf, 4096, text, args);
MessageBox(NULL, buf, "tophat error", 0x10);
#endif
vfprintf(stderr, text, args);
va_end(args);
fprintf(stderr, "\n");
va_end(args);
}

void th_rotate_point(th_vf2 *p, th_vf2 o, fu rot) {
Expand Down

0 comments on commit 982c953

Please sign in to comment.