From fb48626d7e72bfc9ff0b3e2d854d9c8911a68a75 Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Sat, 9 Mar 2024 18:59:08 +0200 Subject: [PATCH] moved config to config folder --- CMakeLists.txt | 8 ++------ src/{Util => common}/config.cpp | 0 src/{Util => common}/config.h | 2 +- src/common/logging/backend.cpp | 2 +- src/core/PS4/HLE/Graphics/video_out.cpp | 2 +- src/core/aerolib/stubs.cpp | 4 ++-- src/core/hle/kernel/cpu_management.cpp | 2 +- src/main.cpp | 2 +- 8 files changed, 9 insertions(+), 13 deletions(-) rename src/{Util => common}/config.cpp (100%) rename src/{Util => common}/config.h (93%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0eb4ca759..3d6c5cfa4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -186,6 +186,8 @@ set(COMMON src/common/logging/backend.cpp src/common/assert.h src/common/bounded_threadsafe_queue.h src/common/concepts.h + src/common/config.cpp + src/common/config.h src/common/debug.h src/common/disassembler.cpp src/common/disassembler.h @@ -229,10 +231,6 @@ set(FILE_FORMAT src/core/file_format/pfs.h src/core/file_format/psf.h ) -set(UTILITIES src/Util/config.cpp - src/Util/config.h -) - if(ENABLE_QT_GUI) qt_add_executable(shadps4 ${QT_GUI} @@ -240,7 +238,6 @@ qt_add_executable(shadps4 ${CORE} ${CRYPTO} ${FILE_FORMAT} - ${UTILITIES} ) else() add_executable(shadps4 @@ -308,7 +305,6 @@ add_executable(shadps4 ${CORE} ${CRYPTO} ${FILE_FORMAT} - ${UTILITIES} ) endif() diff --git a/src/Util/config.cpp b/src/common/config.cpp similarity index 100% rename from src/Util/config.cpp rename to src/common/config.cpp diff --git a/src/Util/config.h b/src/common/config.h similarity index 93% rename from src/Util/config.h rename to src/common/config.h index c28690491..e776cf09c 100644 --- a/src/Util/config.h +++ b/src/common/config.h @@ -4,7 +4,7 @@ #pragma once #include -#include "common/types.h" +#include "types.h" namespace Config { void load(const std::filesystem::path& path); diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 50d18c986..9c82d65a4 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp @@ -6,13 +6,13 @@ #include #include -#include "Util/config.h" #ifdef _WIN32 #include // For OutputDebugStringW #endif #include "common/bounded_threadsafe_queue.h" +#include "common/config.h" #include "common/io_file.h" #include "common/logging/backend.h" #include "common/logging/log.h" diff --git a/src/core/PS4/HLE/Graphics/video_out.cpp b/src/core/PS4/HLE/Graphics/video_out.cpp index 259d0568c..d4e4dfb21 100644 --- a/src/core/PS4/HLE/Graphics/video_out.cpp +++ b/src/core/PS4/HLE/Graphics/video_out.cpp @@ -4,7 +4,7 @@ #include #include #include "Objects/video_out_ctx.h" -#include "Util/config.h" +#include "common/config.h" #include "common/debug.h" #include "common/logging/log.h" #include "common/singleton.h" diff --git a/src/core/aerolib/stubs.cpp b/src/core/aerolib/stubs.cpp index 5a7975486..3c35829f4 100644 --- a/src/core/aerolib/stubs.cpp +++ b/src/core/aerolib/stubs.cpp @@ -19,7 +19,7 @@ namespace Core::AeroLib { // and to longer compile / CI times // // Must match STUBS_LIST define -constexpr u32 MAX_STUBS = 128; +constexpr u32 MAX_STUBS = 512; u64 UnresolvedStub() { LOG_ERROR(Core, "Returning zero to {}", __builtin_return_address(0)); @@ -61,7 +61,7 @@ static u32 UsedStubEntries; #define XREP_256(x) XREP_128(x) XREP_128(x + 128) #define XREP_512(x) XREP_256(x) XREP_256(x + 256) -#define STUBS_LIST XREP_128(0) +#define STUBS_LIST XREP_512(0) static u64 (*stub_handlers[MAX_STUBS])() = {STUBS_LIST}; diff --git a/src/core/hle/kernel/cpu_management.cpp b/src/core/hle/kernel/cpu_management.cpp index 81c3b3fe2..f208337b4 100644 --- a/src/core/hle/kernel/cpu_management.cpp +++ b/src/core/hle/kernel/cpu_management.cpp @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include "Util/config.h" +#include "common/config.h" #include "common/logging/log.h" #include "core/hle/kernel/cpu_management.h" diff --git a/src/main.cpp b/src/main.cpp index 10255db81..efc250096 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -10,7 +10,7 @@ #include #include -#include "Util/config.h" +#include "common/config.h" #include "common/discord.h" #include "common/logging/backend.h" #include "common/path_util.h"