summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/main.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-10-23 19:10:35 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-10-23 19:10:35 +0200
commit60519897a43be9aba177f6a0f542851510322c8e (patch)
tree697e553622067a8fbcf712c7dfd1c9fa6b5bd612 /facetracknoir/main.cpp
parent8857523fada67140e1a07cabb1b7c8b48200a753 (diff)
Integrate Google Breakpad for crash dumps
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
Diffstat (limited to 'facetracknoir/main.cpp')
-rw-r--r--facetracknoir/main.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/facetracknoir/main.cpp b/facetracknoir/main.cpp
index cf7ff6fb..0c8e5c11 100644
--- a/facetracknoir/main.cpp
+++ b/facetracknoir/main.cpp
@@ -31,12 +31,29 @@
#if defined(_WIN32)
# include <windows.h>
-//#pragma comment(linker, "/SUBSYSTEM:console /ENTRY:mainCRTStartup")
+# ifdef OPENTRACK_BREAKPAD
+# include <exception_handler.h>
+using namespace google_breakpad;
+bool dumpCallback(const wchar_t* dump_path,
+ const wchar_t* minidump_id,
+ void* context,
+ EXCEPTION_POINTERS* exinfo,
+ MDRawAssertionInfo* assertion,
+ bool succeeded)
+{
+ return succeeded;
+}
+
+# endif
#endif
int main(int argc, char** argv)
{
QApplication::setAttribute(Qt::AA_X11InitThreads, true);
+
+#ifdef OPENTRACK_BREAKPAD
+ auto handler = new ExceptionHandler(L".", nullptr, dumpCallback, nullptr, -1);
+#endif
QApplication app(argc, argv);