Compare commits
9 commits
3c42287bbf
...
2ca36e1bd7
Author | SHA1 | Date | |
---|---|---|---|
2ca36e1bd7 | |||
911ace690f | |||
9e313227be | |||
1399f32cf3 | |||
32024e4708 | |||
da0823f46f | |||
48ee7afce1 | |||
f6e47c8c97 | |||
8cb98b0c41 |
3 changed files with 10 additions and 5 deletions
|
@ -658,7 +658,7 @@ if(ENABLE_QT)
|
|||
set_target_properties(Qt6::Platform PROPERTIES INTERFACE_COMPILE_FEATURES "")
|
||||
endif()
|
||||
|
||||
if (WIN32 AND YUZU_CRASH_DUMPS)
|
||||
if (YUZU_CRASH_DUMPS)
|
||||
set(BREAKPAD_VER "breakpad-c89f9dd")
|
||||
download_bundled_external("breakpad/" ${BREAKPAD_VER} "breakpad-win" BREAKPAD_PREFIX "c89f9dd")
|
||||
|
||||
|
|
|
@ -251,9 +251,7 @@ if (YUZU_CRASH_DUMPS)
|
|||
breakpad.cpp
|
||||
breakpad.h
|
||||
)
|
||||
|
||||
target_link_libraries(yuzu PRIVATE libbreakpad_client)
|
||||
target_compile_definitions(yuzu PRIVATE YUZU_CRASH_DUMPS)
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
@ -8,6 +11,8 @@
|
|||
#include <client/windows/handler/exception_handler.h>
|
||||
#elif defined(__linux__)
|
||||
#include <client/linux/handler/exception_handler.h>
|
||||
#elif defined(__sun__)
|
||||
#include <client/solaris/handler/exception_handler.h>
|
||||
#else
|
||||
#error Minidump creation not supported on this platform
|
||||
#endif
|
||||
|
@ -49,7 +54,7 @@ static void PruneDumpDirectory(const std::filesystem::path& dump_path) {
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(__linux__)
|
||||
#ifdef __linux__
|
||||
[[noreturn]] bool DumpCallback(const google_breakpad::MinidumpDescriptor& descriptor, void* context,
|
||||
bool succeeded) {
|
||||
// Prevent time- and space-consuming core dumps from being generated, as we have
|
||||
|
@ -63,7 +68,7 @@ void InstallCrashHandler() {
|
|||
const auto dump_path = GetEdenPath(Common::FS::EdenPath::CrashDumpsDir);
|
||||
PruneDumpDirectory(dump_path);
|
||||
|
||||
#if defined(_WIN32)
|
||||
#ifdef _WIN32
|
||||
// TODO: If we switch to MinGW builds for Windows, this needs to be wrapped in a C API.
|
||||
static google_breakpad::ExceptionHandler eh{dump_path, nullptr, nullptr, nullptr,
|
||||
google_breakpad::ExceptionHandler::HANDLER_ALL};
|
||||
|
@ -71,6 +76,8 @@ void InstallCrashHandler() {
|
|||
static google_breakpad::MinidumpDescriptor descriptor{dump_path};
|
||||
static google_breakpad::ExceptionHandler eh{descriptor, nullptr, DumpCallback,
|
||||
nullptr, true, -1};
|
||||
#elif defined(__sun__)
|
||||
static google_breakpad::ExceptionHandler eh{dump_path, nullptr, DumpCallback, nullptr, true};
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue