mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 04:55:13 +00:00
Merge branch 'master' of https://github.com/tildearrow/furnace into es5506_alt
* 'master' of https://github.com/tildearrow/furnace: fudge and bread what?!
This commit is contained in:
commit
131081a030
3 changed files with 23 additions and 1 deletions
|
@ -517,10 +517,13 @@ 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()
|
||||
message(STATUS "Using backward-cpp")
|
||||
else()
|
||||
message(STATUS "Not using backward-cpp")
|
||||
endif()
|
||||
|
||||
if (BUILD_GUI)
|
||||
|
|
|
@ -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