mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-03 19:58:39 -06:00
Added more settings
This commit is contained in:
parent
ee4a3719e9
commit
61d5a93a11
@ -154,22 +154,11 @@ static ConfigEntry<bool> useUnifiedInputConfig(true);
|
||||
static ConfigEntry<string> defaultControllerID("");
|
||||
static ConfigEntry<bool> backgroundControllerInput(false);
|
||||
|
||||
// Audio
|
||||
static ConfigEntry<string> micDevice("Default Device");
|
||||
|
||||
// GPU
|
||||
static ConfigEntry<u32> windowWidth(1280);
|
||||
static ConfigEntry<u32> windowHeight(720);
|
||||
static ConfigEntry<u32> internalScreenWidth(1280);
|
||||
static ConfigEntry<u32> internalScreenHeight(720);
|
||||
static ConfigEntry<bool> shouldCopyGPUBuffers(false);
|
||||
static ConfigEntry<bool> readbacksEnabled(false);
|
||||
static ConfigEntry<bool> readbackLinearImagesEnabled(false);
|
||||
static ConfigEntry<bool> directMemoryAccessEnabled(false);
|
||||
static ConfigEntry<bool> shouldDumpShaders(false);
|
||||
static ConfigEntry<bool> shouldPatchShaders(false);
|
||||
static ConfigEntry<u32> vblankFrequency(60);
|
||||
static ConfigEntry<bool> isHDRAllowed(false);
|
||||
static ConfigEntry<bool> fsrEnabled(false);
|
||||
static ConfigEntry<bool> rcasEnabled(true);
|
||||
static ConfigEntry<int> rcasAttenuation(250);
|
||||
@ -205,23 +194,11 @@ static string config_version = Common::g_scm_rev;
|
||||
// These entries aren't stored in the config
|
||||
static bool overrideControllerColor = false;
|
||||
static int controllerCustomColorRGB[3] = {0, 0, 255};
|
||||
static bool isGameRunning = false;
|
||||
static bool load_auto_patches = true;
|
||||
|
||||
bool getGameRunning() {
|
||||
return isGameRunning;
|
||||
}
|
||||
|
||||
void setGameRunning(bool running) {
|
||||
isGameRunning = running;
|
||||
}
|
||||
|
||||
int getVolumeSlider() {
|
||||
return volumeSlider.get();
|
||||
}
|
||||
bool allowHDR() {
|
||||
return isHDRAllowed.get();
|
||||
}
|
||||
|
||||
bool GetUseUnifiedInputConfig() {
|
||||
return useUnifiedInputConfig.get();
|
||||
@ -269,26 +246,6 @@ int getCursorHideTimeout() {
|
||||
return cursorHideTimeout.get();
|
||||
}
|
||||
|
||||
string getMicDevice() {
|
||||
return micDevice.get();
|
||||
}
|
||||
|
||||
u32 getWindowWidth() {
|
||||
return windowWidth.get();
|
||||
}
|
||||
|
||||
u32 getWindowHeight() {
|
||||
return windowHeight.get();
|
||||
}
|
||||
|
||||
u32 getInternalScreenWidth() {
|
||||
return internalScreenHeight.get();
|
||||
}
|
||||
|
||||
u32 getInternalScreenHeight() {
|
||||
return internalScreenHeight.get();
|
||||
}
|
||||
|
||||
void setUserName(int id, string name) {
|
||||
auto temp = userNames.get();
|
||||
temp[id] = name;
|
||||
@ -315,14 +272,6 @@ bool getIsMotionControlsEnabled() {
|
||||
return isMotionControlsEnabled.get();
|
||||
}
|
||||
|
||||
bool copyGPUCmdBuffers() {
|
||||
return shouldCopyGPUBuffers.get();
|
||||
}
|
||||
|
||||
bool readbacks() {
|
||||
return readbacksEnabled.get();
|
||||
}
|
||||
|
||||
bool readbackLinearImages() {
|
||||
return readbackLinearImagesEnabled.get();
|
||||
}
|
||||
@ -410,34 +359,6 @@ void setVkGuestMarkersEnabled(bool enable, bool is_game_specific) {
|
||||
vkGuestMarkers.set(enable, is_game_specific);
|
||||
}
|
||||
|
||||
void setWindowWidth(u32 width, bool is_game_specific) {
|
||||
windowWidth.set(width, is_game_specific);
|
||||
}
|
||||
|
||||
void setWindowHeight(u32 height, bool is_game_specific) {
|
||||
windowHeight.set(height, is_game_specific);
|
||||
}
|
||||
|
||||
void setInternalScreenWidth(u32 width) {
|
||||
internalScreenWidth.base_value = width;
|
||||
}
|
||||
|
||||
void setInternalScreenHeight(u32 height) {
|
||||
internalScreenHeight.base_value = height;
|
||||
}
|
||||
|
||||
void setAllowHDR(bool enable, bool is_game_specific) {
|
||||
isHDRAllowed.set(enable, is_game_specific);
|
||||
}
|
||||
|
||||
void setCopyGPUCmdBuffers(bool enable, bool is_game_specific) {
|
||||
shouldCopyGPUBuffers.set(enable, is_game_specific);
|
||||
}
|
||||
|
||||
void setReadbacks(bool enable, bool is_game_specific) {
|
||||
readbacksEnabled.set(enable, is_game_specific);
|
||||
}
|
||||
|
||||
void setReadbackLinearImages(bool enable, bool is_game_specific) {
|
||||
readbackLinearImagesEnabled.set(enable, is_game_specific);
|
||||
}
|
||||
@ -490,10 +411,6 @@ void setCursorHideTimeout(int newcursorHideTimeout, bool is_game_specific) {
|
||||
cursorHideTimeout.set(newcursorHideTimeout, is_game_specific);
|
||||
}
|
||||
|
||||
void setMicDevice(std::string device, bool is_game_specific) {
|
||||
micDevice.set(device, is_game_specific);
|
||||
}
|
||||
|
||||
void setLanguage(u32 language, bool is_game_specific) {
|
||||
m_language.set(language, is_game_specific);
|
||||
}
|
||||
@ -612,27 +529,13 @@ void load(const std::filesystem::path& path, bool is_game_specific) {
|
||||
usbDeviceBackend.setFromToml(input, "usbDeviceBackend", is_game_specific);
|
||||
}
|
||||
|
||||
if (data.contains("Audio")) {
|
||||
const toml::value& audio = data.at("Audio");
|
||||
|
||||
micDevice.setFromToml(audio, "micDevice", is_game_specific);
|
||||
}
|
||||
|
||||
if (data.contains("GPU")) {
|
||||
const toml::value& gpu = data.at("GPU");
|
||||
|
||||
windowWidth.setFromToml(gpu, "screenWidth", is_game_specific);
|
||||
windowHeight.setFromToml(gpu, "screenHeight", is_game_specific);
|
||||
internalScreenWidth.setFromToml(gpu, "internalScreenWidth", is_game_specific);
|
||||
internalScreenHeight.setFromToml(gpu, "internalScreenHeight", is_game_specific);
|
||||
shouldCopyGPUBuffers.setFromToml(gpu, "copyGPUBuffers", is_game_specific);
|
||||
readbacksEnabled.setFromToml(gpu, "readbacks", is_game_specific);
|
||||
readbackLinearImagesEnabled.setFromToml(gpu, "readbackLinearImages", is_game_specific);
|
||||
directMemoryAccessEnabled.setFromToml(gpu, "directMemoryAccess", is_game_specific);
|
||||
shouldDumpShaders.setFromToml(gpu, "dumpShaders", is_game_specific);
|
||||
shouldPatchShaders.setFromToml(gpu, "patchShaders", is_game_specific);
|
||||
vblankFrequency.setFromToml(gpu, "vblankFrequency", is_game_specific);
|
||||
isHDRAllowed.setFromToml(gpu, "allowHDR", is_game_specific);
|
||||
fsrEnabled.setFromToml(gpu, "fsrEnabled", is_game_specific);
|
||||
rcasEnabled.setFromToml(gpu, "rcasEnabled", is_game_specific);
|
||||
rcasAttenuation.setFromToml(gpu, "rcasAttenuation", is_game_specific);
|
||||
@ -741,16 +644,9 @@ void save(const std::filesystem::path& path, bool is_game_specific) {
|
||||
is_game_specific);
|
||||
usbDeviceBackend.setTomlValue(data, "Input", "usbDeviceBackend", is_game_specific);
|
||||
|
||||
micDevice.setTomlValue(data, "Audio", "micDevice", is_game_specific);
|
||||
|
||||
windowWidth.setTomlValue(data, "GPU", "screenWidth", is_game_specific);
|
||||
windowHeight.setTomlValue(data, "GPU", "screenHeight", is_game_specific);
|
||||
shouldCopyGPUBuffers.setTomlValue(data, "GPU", "copyGPUBuffers", is_game_specific);
|
||||
readbacksEnabled.setTomlValue(data, "GPU", "readbacks", is_game_specific);
|
||||
readbackLinearImagesEnabled.setTomlValue(data, "GPU", "readbackLinearImages", is_game_specific);
|
||||
shouldDumpShaders.setTomlValue(data, "GPU", "dumpShaders", is_game_specific);
|
||||
vblankFrequency.setTomlValue(data, "GPU", "vblankFrequency", is_game_specific);
|
||||
isHDRAllowed.setTomlValue(data, "GPU", "allowHDR", is_game_specific);
|
||||
fsrEnabled.setTomlValue(data, "GPU", "fsrEnabled", is_game_specific);
|
||||
rcasEnabled.setTomlValue(data, "GPU", "rcasEnabled", is_game_specific);
|
||||
rcasAttenuation.setTomlValue(data, "GPU", "rcasAttenuation", is_game_specific);
|
||||
@ -779,8 +675,6 @@ void save(const std::filesystem::path& path, bool is_game_specific) {
|
||||
data["Input"]["useSpecialPad"] = useSpecialPad.base_value;
|
||||
data["Input"]["specialPadClass"] = specialPadClass.base_value;
|
||||
data["Input"]["useUnifiedInputConfig"] = useUnifiedInputConfig.base_value;
|
||||
data["GPU"]["internalScreenWidth"] = internalScreenWidth.base_value;
|
||||
data["GPU"]["internalScreenHeight"] = internalScreenHeight.base_value;
|
||||
data["GPU"]["patchShaders"] = shouldPatchShaders.base_value;
|
||||
data["Debug"]["FPSColor"] = isFpsColor.base_value;
|
||||
data["Debug"]["showFpsCounter"] = showFpsCounter.base_value;
|
||||
@ -799,7 +693,6 @@ void setDefaultValues(bool is_game_specific) {
|
||||
// Entries with game-specific settings that are in the game-specific setings GUI but not in
|
||||
// the global settings GUI
|
||||
if (is_game_specific) {
|
||||
readbacksEnabled.setDefault(is_game_specific);
|
||||
readbackLinearImagesEnabled.setDefault(is_game_specific);
|
||||
directMemoryAccessEnabled.setDefault(is_game_specific);
|
||||
}
|
||||
@ -816,16 +709,9 @@ void setDefaultValues(bool is_game_specific) {
|
||||
backgroundControllerInput.setDefault(is_game_specific);
|
||||
usbDeviceBackend.setDefault(is_game_specific);
|
||||
|
||||
// GS - Audio
|
||||
micDevice.setDefault(is_game_specific);
|
||||
|
||||
// GS - GPU
|
||||
windowWidth.setDefault(is_game_specific);
|
||||
windowHeight.setDefault(is_game_specific);
|
||||
shouldCopyGPUBuffers.setDefault(is_game_specific);
|
||||
shouldDumpShaders.setDefault(is_game_specific);
|
||||
vblankFrequency.setDefault(is_game_specific);
|
||||
isHDRAllowed.setDefault(is_game_specific);
|
||||
fsrEnabled.setDefault(is_game_specific);
|
||||
rcasEnabled.setDefault(is_game_specific);
|
||||
rcasAttenuation.setDefault(is_game_specific);
|
||||
@ -857,9 +743,6 @@ void setDefaultValues(bool is_game_specific) {
|
||||
|
||||
// GPU
|
||||
shouldPatchShaders.base_value = false;
|
||||
internalScreenWidth.base_value = 1280;
|
||||
internalScreenHeight.base_value = 720;
|
||||
|
||||
// Debug
|
||||
isFpsColor.base_value = true;
|
||||
showFpsCounter.base_value = false;
|
||||
|
||||
@ -27,26 +27,10 @@ void load(const std::filesystem::path& path, bool is_game_specific = false);
|
||||
void save(const std::filesystem::path& path, bool is_game_specific = false);
|
||||
void resetGameSpecificValue(std::string entry);
|
||||
|
||||
bool getGameRunning();
|
||||
void setGameRunning(bool running);
|
||||
int getVolumeSlider();
|
||||
void setVolumeSlider(int volumeValue, bool is_game_specific = false);
|
||||
std::string getTrophyKey();
|
||||
void setTrophyKey(std::string key);
|
||||
u32 getWindowWidth();
|
||||
u32 getWindowHeight();
|
||||
void setWindowWidth(u32 width, bool is_game_specific = false);
|
||||
void setWindowHeight(u32 height, bool is_game_specific = false);
|
||||
u32 getInternalScreenWidth();
|
||||
u32 getInternalScreenHeight();
|
||||
void setInternalScreenWidth(u32 width);
|
||||
void setInternalScreenHeight(u32 height);
|
||||
bool allowHDR();
|
||||
void setAllowHDR(bool enable, bool is_game_specific = false);
|
||||
bool copyGPUCmdBuffers();
|
||||
void setCopyGPUCmdBuffers(bool enable, bool is_game_specific = false);
|
||||
bool readbacks();
|
||||
void setReadbacks(bool enable, bool is_game_specific = false);
|
||||
bool readbackLinearImages();
|
||||
void setReadbackLinearImages(bool enable, bool is_game_specific = false);
|
||||
bool directMemoryAccess();
|
||||
@ -78,9 +62,7 @@ void setRdocEnabled(bool enable, bool is_game_specific = false);
|
||||
void setPipelineCacheEnabled(bool enable, bool is_game_specific = false);
|
||||
void setPipelineCacheArchived(bool enable, bool is_game_specific = false);
|
||||
int getCursorHideTimeout();
|
||||
std::string getMicDevice();
|
||||
void setCursorHideTimeout(int newcursorHideTimeout, bool is_game_specific = false);
|
||||
void setMicDevice(std::string device, bool is_game_specific = false);
|
||||
u32 GetLanguage();
|
||||
void setLanguage(u32 language, bool is_game_specific = false);
|
||||
void setUseSpecialPad(bool use);
|
||||
|
||||
@ -411,6 +411,8 @@ public:
|
||||
SETTING_FORWARD(m_gpu, PresentMode, present_mode)
|
||||
SETTING_FORWARD(m_gpu, WindowHeight, window_height)
|
||||
SETTING_FORWARD(m_gpu, WindowWidth, window_width)
|
||||
SETTING_FORWARD(m_gpu, InternalScreenHeight, internal_screen_height)
|
||||
SETTING_FORWARD(m_gpu, InternalScreenWidth, internal_screen_width)
|
||||
SETTING_FORWARD_BOOL(m_gpu, HdrAllowed, hdr_allowed)
|
||||
SETTING_FORWARD_BOOL(m_gpu, FsrEnabled, fsr_enabled)
|
||||
SETTING_FORWARD_BOOL(m_gpu, RcasEnabled, rcas_enabled)
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2024-2026 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <cstring>
|
||||
#include <common/config.h>
|
||||
#include <common/logging/log.h>
|
||||
#include "core/emulator_settings.h"
|
||||
#include "sdl_in.h"
|
||||
|
||||
int SDLAudioIn::AudioInit() {
|
||||
@ -45,7 +46,7 @@ int SDLAudioIn::AudioInOpen(int type, uint32_t samples_num, uint32_t freq, uint3
|
||||
fmt.channels = port.channels_num;
|
||||
fmt.freq = port.freq;
|
||||
|
||||
std::string micDevStr = Config::getMicDevice();
|
||||
std::string micDevStr = EmulatorSettings::GetInstance()->GetMicDevice();
|
||||
uint32_t devId;
|
||||
|
||||
bool nullDevice = false;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2024-2026 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "gnm_error.h"
|
||||
@ -12,6 +12,7 @@
|
||||
#include "common/slot_vector.h"
|
||||
#include "core/address_space.h"
|
||||
#include "core/debug_state.h"
|
||||
#include "core/emulator_settings.h"
|
||||
#include "core/libraries/gnmdriver/gnm_error.h"
|
||||
#include "core/libraries/gnmdriver/gnmdriver_init.h"
|
||||
#include "core/libraries/kernel/orbis_error.h"
|
||||
@ -2850,7 +2851,7 @@ void RegisterLib(Core::Loader::SymbolsResolver* sym) {
|
||||
sdk_version = 0;
|
||||
}
|
||||
|
||||
if (Config::copyGPUCmdBuffers()) {
|
||||
if (EmulatorSettings::GetInstance()->IsCopyGpuBuffers()) {
|
||||
liverpool->ReserveCopyBufferSpace();
|
||||
}
|
||||
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2024-2026 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "common/config.h"
|
||||
#include "common/elf_info.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/emulator_settings.h"
|
||||
#include "core/libraries/libs.h"
|
||||
#include "core/libraries/system/userservice.h"
|
||||
#include "core/libraries/videoout/driver.h"
|
||||
@ -451,8 +452,9 @@ s32 PS4_SYSV_ABI sceVideoOutSetWindowModeMargins(s32 handle, s32 top, s32 bottom
|
||||
}
|
||||
|
||||
void RegisterLib(Core::Loader::SymbolsResolver* sym) {
|
||||
driver = std::make_unique<VideoOutDriver>(Config::getInternalScreenWidth(),
|
||||
Config::getInternalScreenHeight());
|
||||
driver = std::make_unique<VideoOutDriver>(
|
||||
EmulatorSettings::GetInstance()->GetInternalScreenWidth(),
|
||||
EmulatorSettings::GetInstance()->GetInternalScreenHeight());
|
||||
|
||||
LIB_FUNCTION("SbU3dwp80lQ", "libSceVideoOut", 1, "libSceVideoOut", sceVideoOutGetFlipStatus);
|
||||
LIB_FUNCTION("U46NwOiJpys", "libSceVideoOut", 1, "libSceVideoOut", sceVideoOutSubmitFlip);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 shadPS4 Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2025-2026 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <filesystem>
|
||||
@ -213,12 +213,13 @@ void Emulator::Run(std::filesystem::path file, std::vector<std::string> args,
|
||||
EmulatorSettings::GetInstance()->IsConnectedToNetwork());
|
||||
LOG_INFO(Config, "General isPsnSignedIn: {}", EmulatorSettings::GetInstance()->IsPSNSignedIn());
|
||||
LOG_INFO(Config, "GPU isNullGpu: {}", EmulatorSettings::GetInstance()->IsNullGPU());
|
||||
LOG_INFO(Config, "GPU readbacks: {}", Config::readbacks());
|
||||
LOG_INFO(Config, "GPU readbacks: {}", EmulatorSettings::GetInstance()->IsReadbacksEnabled());
|
||||
LOG_INFO(Config, "GPU readbackLinearImages: {}", Config::readbackLinearImages());
|
||||
LOG_INFO(Config, "GPU directMemoryAccess: {}", Config::directMemoryAccess());
|
||||
LOG_INFO(Config, "GPU shouldDumpShaders: {}", Config::dumpShaders());
|
||||
LOG_INFO(Config, "GPU vblankFrequency: {}", Config::vblankFreq());
|
||||
LOG_INFO(Config, "GPU shouldCopyGPUBuffers: {}", Config::copyGPUCmdBuffers());
|
||||
LOG_INFO(Config, "GPU shouldCopyGPUBuffers: {}",
|
||||
EmulatorSettings::GetInstance()->IsCopyGpuBuffers());
|
||||
LOG_INFO(Config, "Vulkan gpuId: {}", EmulatorSettings::GetInstance()->GetGpuId());
|
||||
LOG_INFO(Config, "Vulkan vkValidation: {}", Config::vkValidationEnabled());
|
||||
LOG_INFO(Config, "Vulkan vkValidationCore: {}", Config::vkValidationCoreEnabled());
|
||||
@ -304,7 +305,8 @@ void Emulator::Run(std::filesystem::path file, std::vector<std::string> args,
|
||||
}
|
||||
}
|
||||
window = std::make_unique<Frontend::WindowSDL>(
|
||||
Config::getWindowWidth(), Config::getWindowHeight(), controllers, window_title);
|
||||
EmulatorSettings::GetInstance()->GetWindowWidth(),
|
||||
EmulatorSettings::GetInstance()->GetWindowHeight(), controllers, window_title);
|
||||
|
||||
g_window = window.get();
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2024-2026 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <boost/preprocessor/stringize.hpp>
|
||||
@ -9,6 +9,7 @@
|
||||
#include "common/polyfill_thread.h"
|
||||
#include "common/thread.h"
|
||||
#include "core/debug_state.h"
|
||||
#include "core/emulator_settings.h"
|
||||
#include "core/libraries/kernel/process.h"
|
||||
#include "core/libraries/videoout/driver.h"
|
||||
#include "core/memory.h"
|
||||
@ -1095,7 +1096,7 @@ Liverpool::CmdBuffer Liverpool::CopyCmdBuffers(std::span<const u32> dcb, std::sp
|
||||
void Liverpool::SubmitGfx(std::span<const u32> dcb, std::span<const u32> ccb) {
|
||||
auto& queue = mapped_queues[GfxQueueId];
|
||||
|
||||
if (Config::copyGPUCmdBuffers()) {
|
||||
if (EmulatorSettings::GetInstance()->IsCopyGpuBuffers()) {
|
||||
std::tie(dcb, ccb) = CopyCmdBuffers(dcb, ccb);
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2024-2026 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
@ -9,6 +9,7 @@
|
||||
#include <vector>
|
||||
#include "common/debug.h"
|
||||
#include "common/types.h"
|
||||
#include "core/emulator_settings.h"
|
||||
#include "video_core/buffer_cache/region_manager.h"
|
||||
|
||||
namespace VideoCore {
|
||||
@ -71,7 +72,7 @@ public:
|
||||
// modified. If we need to flush the flush function is going to perform CPU
|
||||
// state change.
|
||||
std::scoped_lock lk{manager->lock};
|
||||
if (Config::readbacks() &&
|
||||
if (EmulatorSettings::GetInstance()->IsReadbacksEnabled() &&
|
||||
manager->template IsRegionModified<Type::GPU>(offset, size)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2024-2026 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
@ -14,6 +14,7 @@
|
||||
#endif
|
||||
#include "common/debug.h"
|
||||
#include "common/types.h"
|
||||
#include "core/emulator_settings.h"
|
||||
#include "video_core/buffer_cache/region_definitions.h"
|
||||
#include "video_core/page_manager.h"
|
||||
|
||||
@ -95,7 +96,7 @@ public:
|
||||
}
|
||||
if constexpr (type == Type::CPU) {
|
||||
UpdateProtection<!enable, false>();
|
||||
} else if (Config::readbacks()) {
|
||||
} else if (EmulatorSettings::GetInstance()->IsReadbacksEnabled()) {
|
||||
UpdateProtection<enable, true>();
|
||||
}
|
||||
}
|
||||
@ -126,7 +127,7 @@ public:
|
||||
bits.UnsetRange(start_page, end_page);
|
||||
if constexpr (type == Type::CPU) {
|
||||
UpdateProtection<true, false>();
|
||||
} else if (Config::readbacks()) {
|
||||
} else if (EmulatorSettings::GetInstance()->IsReadbacksEnabled()) {
|
||||
UpdateProtection<false, true>();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2024-2026 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
// Include the vulkan platform specific header
|
||||
@ -20,6 +20,7 @@
|
||||
#include "common/config.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/path_util.h"
|
||||
#include "core/emulator_settings.h"
|
||||
#include "sdl_window.h"
|
||||
#include "video_core/renderer_vulkan/vk_platform.h"
|
||||
|
||||
@ -200,7 +201,7 @@ std::vector<const char*> GetInstanceExtensions(Frontend::WindowSystemType window
|
||||
extensions.push_back(VK_KHR_SURFACE_EXTENSION_NAME);
|
||||
}
|
||||
|
||||
if (Config::allowHDR()) {
|
||||
if (EmulatorSettings::GetInstance()->IsHdrAllowed()) {
|
||||
extensions.push_back(VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME);
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 shadPS4 Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2025-2026 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <algorithm>
|
||||
@ -165,7 +165,7 @@ void Swapchain::FindPresentFormat() {
|
||||
return format == SURFACE_FORMAT_HDR;
|
||||
}) != formats.end();
|
||||
// Also make sure that user allowed us to use HDR
|
||||
supports_hdr &= Config::allowHDR();
|
||||
supports_hdr &= EmulatorSettings::GetInstance()->IsHdrAllowed();
|
||||
|
||||
// If there is a single undefined surface format, the device doesn't care, so we'll just use
|
||||
// RGBA sRGB.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user