mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 13:05:11 +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)
|
set(USED_SOURCES ${ENGINE_SOURCES} ${AUDIO_SOURCES} src/main.cpp)
|
||||||
|
|
||||||
if (USE_BACKWARD)
|
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")
|
if (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
list(APPEND DEPENDENCIES_LIBRARIES dbghelp psapi)
|
list(APPEND DEPENDENCIES_LIBRARIES dbghelp psapi)
|
||||||
endif()
|
endif()
|
||||||
|
message(STATUS "Using backward-cpp")
|
||||||
|
else()
|
||||||
|
message(STATUS "Not using backward-cpp")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (BUILD_GUI)
|
if (BUILD_GUI)
|
||||||
|
|
|
@ -39,4 +39,12 @@ namespace backward {
|
||||||
|
|
||||||
backward::SignalHandling sh;
|
backward::SignalHandling sh;
|
||||||
|
|
||||||
|
void checkInitialized() {
|
||||||
|
if (!sh.loaded()) {
|
||||||
|
#ifdef _WIN32
|
||||||
|
MessageBox(NULL,"Warning","crash backtrace not available!",MB_OK|MB_ICONWARNING);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace backward
|
} // namespace backward
|
||||||
|
|
11
src/main.cpp
11
src/main.cpp
|
@ -39,6 +39,10 @@
|
||||||
#include "gui/gui.h"
|
#include "gui/gui.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_BACKWARD
|
||||||
|
#include "../extern/backward/backward.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
DivEngine e;
|
DivEngine e;
|
||||||
|
|
||||||
#ifdef HAVE_GUI
|
#ifdef HAVE_GUI
|
||||||
|
@ -242,6 +246,7 @@ void initParams() {
|
||||||
// TODO: CoInitializeEx on Windows?
|
// TODO: CoInitializeEx on Windows?
|
||||||
// TODO: add crash log
|
// TODO: add crash log
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
|
backward::SignalHandling sh;
|
||||||
initLog();
|
initLog();
|
||||||
#if !(defined(__APPLE__) || defined(_WIN32) || defined(ANDROID))
|
#if !(defined(__APPLE__) || defined(_WIN32) || defined(ANDROID))
|
||||||
// workaround for Wayland HiDPI issue
|
// 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);
|
e.setConsoleMode(consoleMode);
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
Loading…
Reference in a new issue