mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-30 08:23:01 +00:00
fudge and bread
This commit is contained in:
parent
bf0b207a3d
commit
6afe29682d
3 changed files with 20 additions and 1 deletions
|
@ -509,7 +509,7 @@ endif()
|
|||
set(USED_SOURCES ${ENGINE_SOURCES} ${AUDIO_SOURCES} src/main.cpp)
|
||||
|
||||
if (USE_BACKWARD)
|
||||
list(APPEND USED_SOURCES src/backtrace.cpp)
|
||||
list(APPEND DEPENDENCIES_DEFINES HAVE_BACKWARD)
|
||||
if (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
list(APPEND DEPENDENCIES_LIBRARIES dbghelp psapi)
|
||||
endif()
|
||||
|
|
|
@ -39,4 +39,12 @@ namespace backward {
|
|||
|
||||
backward::SignalHandling sh;
|
||||
|
||||
void checkInitialized() {
|
||||
if (!sh.loaded()) {
|
||||
#ifdef _WIN32
|
||||
MessageBox(NULL,"Warning","crash backtrace not available!",MB_OK|MB_ICONWARNING);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace backward
|
||||
|
|
11
src/main.cpp
11
src/main.cpp
|
@ -39,6 +39,10 @@
|
|||
#include "gui/gui.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BACKWARD
|
||||
#include "../extern/backward/backward.hpp"
|
||||
#endif
|
||||
|
||||
DivEngine e;
|
||||
|
||||
#ifdef HAVE_GUI
|
||||
|
@ -242,6 +246,7 @@ void initParams() {
|
|||
// TODO: CoInitializeEx on Windows?
|
||||
// TODO: add crash log
|
||||
int main(int argc, char** argv) {
|
||||
backward::SignalHandling sh;
|
||||
initLog();
|
||||
#if !(defined(__APPLE__) || defined(_WIN32) || defined(ANDROID))
|
||||
// workaround for Wayland HiDPI issue
|
||||
|
@ -301,6 +306,12 @@ int main(int argc, char** argv) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!sh.loaded()) {
|
||||
#ifdef _WIN32
|
||||
MessageBox(NULL,"Warning","crash backtrace not available!",MB_OK|MB_ICONWARNING);
|
||||
#endif
|
||||
}
|
||||
|
||||
e.setConsoleMode(consoleMode);
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
Loading…
Reference in a new issue