Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@
[submodule "externals/MoltenVK"]
path = externals/MoltenVK
url = https://github.com/shadPS4-emu/ext-MoltenVK.git
[submodule "externals/spdlog"]
path = externals/spdlog
url = https://github.com/gabime/spdlog
shallow = true
branch = v1.x
13 changes: 3 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -258,16 +258,9 @@ file(APPEND ${TRANSLATIONS_QRC} "</qresource></RCC>")

qt_add_resources(TRANSLATIONS ${TRANSLATIONS_QRC})

set(COMMON src/common/logging/backend.cpp
src/common/logging/backend.h
src/common/logging/filter.cpp
src/common/logging/filter.h
src/common/logging/formatter.h
src/common/logging/log_entry.h
set(COMMON src/common/logging/classes.h
src/common/logging/log.cpp
src/common/logging/log.h
src/common/logging/text_formatter.cpp
src/common/logging/text_formatter.h
src/common/logging/types.h
src/common/log_analyzer.cpp
src/common/log_analyzer.h
src/common/aes.h
Expand Down Expand Up @@ -399,7 +392,7 @@ qt_add_executable(shadPS4QtLauncher

create_target_directory_groups(shadPS4QtLauncher)

target_link_libraries(shadPS4QtLauncher PRIVATE Vulkan::Headers fmt::fmt toml11::toml11 SDL3::SDL3 volk_headers)
target_link_libraries(shadPS4QtLauncher PRIVATE Vulkan::Headers fmt::fmt toml11::toml11 SDL3::SDL3 volk_headers spdlog::spdlog)

if (APPLE)
# Include MoltenVK, along with an ICD file so it can be found by the system Vulkan loader if used for loading layers.
Expand Down
6 changes: 6 additions & 0 deletions externals/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,9 @@ add_subdirectory(volk)
#nlohmann json
set(JSON_BuildTests OFF CACHE INTERNAL "")
add_subdirectory(json)

# spdlog
set(SPDLOG_NO_EXCEPTIONS ON)
set(SPDLOG_FMT_EXTERNAL ON)
set(SPDLOG_DISABLE_DEFAULT_LOGGER ON)
add_subdirectory(spdlog EXCLUDE_FROM_ALL SYSTEM)
1 change: 1 addition & 0 deletions externals/spdlog
Submodule spdlog added at 0f7562
8 changes: 3 additions & 5 deletions src/common/assert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later

#include "common/assert.h"
#include "common/logging/backend.h"
#include "common/logging/log.h"

#if defined(__x86_64__) || defined(_M_X64)
#define Crash() __asm__ __volatile__("int $3")
Expand All @@ -13,14 +13,12 @@
#endif

void assert_fail_impl() {
Common::Log::Stop();
std::fflush(stdout);
Common::Log::Shutdown();
Crash();
}

[[noreturn]] void unreachable_impl() {
Common::Log::Stop();
std::fflush(stdout);
Common::Log::Shutdown();
Crash();
throw std::runtime_error("Unreachable code");
}
Expand Down
Loading