File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change 1313
1414namespace helper {
1515
16- #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || defined(__MINGW32__) \
17- || defined (__MINGW64__)
18- // "WinUser.h" defines "#define MessageBox MessageBoxA"
19- // which breaks this valid code, I love windows xD.
20- #ifdef MessageBox
21- #undef MessageBox
22- #endif
23- #endif
24-
25-
2616 struct MessageBox {
2717 enum class Type : u8 { Error, Warning, Information };
2818
@@ -36,4 +26,16 @@ namespace helper {
3626 };
3727
3828
29+ #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || defined(__MINGW32__) \
30+ || defined (__MINGW64__)
31+ // "WinUser.h" defines "#define MessageBox MessageBoxA"
32+ // which breaks this valid code, I love windows xD.
33+ #ifdef MessageBox
34+ #undef MessageBox
35+ #endif
36+ // this is to fix include order, if we include windows.h after this, it also works
37+ using MessageBoxA = MessageBox;
38+ #endif
39+
40+
3941} // namespace helper
You can’t perform that action at this time.
0 commit comments