mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-14 08:12:16 +00:00
Add isDevKit bool (#2685)
This commit is contained in:
parent
3abe5b0d57
commit
9c37aa039b
3 changed files with 19 additions and 0 deletions
|
@ -32,6 +32,7 @@ std::filesystem::path find_fs_path_or(const basic_value<TC>& v, const K& ky,
|
||||||
namespace Config {
|
namespace Config {
|
||||||
|
|
||||||
static bool isNeo = false;
|
static bool isNeo = false;
|
||||||
|
static bool isDevKit = false;
|
||||||
static bool playBGM = false;
|
static bool playBGM = false;
|
||||||
static bool isTrophyPopupDisabled = false;
|
static bool isTrophyPopupDisabled = false;
|
||||||
static int BGMvolume = 50;
|
static int BGMvolume = 50;
|
||||||
|
@ -167,6 +168,10 @@ bool isNeoModeConsole() {
|
||||||
return isNeo;
|
return isNeo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isDevKitConsole() {
|
||||||
|
return isDevKit;
|
||||||
|
}
|
||||||
|
|
||||||
bool getIsFullscreen() {
|
bool getIsFullscreen() {
|
||||||
return isFullscreen;
|
return isFullscreen;
|
||||||
}
|
}
|
||||||
|
@ -755,6 +760,7 @@ void load(const std::filesystem::path& path) {
|
||||||
const toml::value& general = data.at("General");
|
const toml::value& general = data.at("General");
|
||||||
|
|
||||||
isNeo = toml::find_or<bool>(general, "isPS4Pro", false);
|
isNeo = toml::find_or<bool>(general, "isPS4Pro", false);
|
||||||
|
isDevKit = toml::find_or<bool>(general, "isDevKit", false);
|
||||||
playBGM = toml::find_or<bool>(general, "playBGM", false);
|
playBGM = toml::find_or<bool>(general, "playBGM", false);
|
||||||
isTrophyPopupDisabled = toml::find_or<bool>(general, "isTrophyPopupDisabled", false);
|
isTrophyPopupDisabled = toml::find_or<bool>(general, "isTrophyPopupDisabled", false);
|
||||||
trophyNotificationDuration =
|
trophyNotificationDuration =
|
||||||
|
@ -955,6 +961,7 @@ void save(const std::filesystem::path& path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
data["General"]["isPS4Pro"] = isNeo;
|
data["General"]["isPS4Pro"] = isNeo;
|
||||||
|
data["General"]["isDevKit"] = isDevKit;
|
||||||
data["General"]["isTrophyPopupDisabled"] = isTrophyPopupDisabled;
|
data["General"]["isTrophyPopupDisabled"] = isTrophyPopupDisabled;
|
||||||
data["General"]["trophyNotificationDuration"] = trophyNotificationDuration;
|
data["General"]["trophyNotificationDuration"] = trophyNotificationDuration;
|
||||||
data["General"]["playBGM"] = playBGM;
|
data["General"]["playBGM"] = playBGM;
|
||||||
|
@ -1101,6 +1108,7 @@ void saveMainWindow(const std::filesystem::path& path) {
|
||||||
void setDefaultValues() {
|
void setDefaultValues() {
|
||||||
isHDRAllowed = false;
|
isHDRAllowed = false;
|
||||||
isNeo = false;
|
isNeo = false;
|
||||||
|
isDevKit = false;
|
||||||
isFullscreen = false;
|
isFullscreen = false;
|
||||||
isTrophyPopupDisabled = false;
|
isTrophyPopupDisabled = false;
|
||||||
playBGM = false;
|
playBGM = false;
|
||||||
|
|
|
@ -28,6 +28,7 @@ void setLoadGameSizeEnabled(bool enable);
|
||||||
bool getIsFullscreen();
|
bool getIsFullscreen();
|
||||||
std::string getFullscreenMode();
|
std::string getFullscreenMode();
|
||||||
bool isNeoModeConsole();
|
bool isNeoModeConsole();
|
||||||
|
bool isDevKitConsole();
|
||||||
bool getPlayBGM();
|
bool getPlayBGM();
|
||||||
int getBGMvolume();
|
int getBGMvolume();
|
||||||
bool getisTrophyPopupDisabled();
|
bool getisTrophyPopupDisabled();
|
||||||
|
|
|
@ -38,6 +38,16 @@ void MemoryManager::SetupMemoryRegions(u64 flexible_size, bool use_extended_mem1
|
||||||
bool use_extended_mem2) {
|
bool use_extended_mem2) {
|
||||||
const bool is_neo = ::Libraries::Kernel::sceKernelIsNeoMode();
|
const bool is_neo = ::Libraries::Kernel::sceKernelIsNeoMode();
|
||||||
auto total_size = is_neo ? SCE_KERNEL_TOTAL_MEM_PRO : SCE_KERNEL_TOTAL_MEM;
|
auto total_size = is_neo ? SCE_KERNEL_TOTAL_MEM_PRO : SCE_KERNEL_TOTAL_MEM;
|
||||||
|
if (Config::isDevKitConsole()) {
|
||||||
|
const auto old_size = total_size;
|
||||||
|
// Assuming 2gb is neo for now, will need to link it with sceKernelIsDevKit
|
||||||
|
total_size += is_neo ? 2_GB : 768_MB;
|
||||||
|
LOG_WARNING(Kernel_Vmm,
|
||||||
|
"Config::isDevKitConsole is enabled! Added additional {:s} of direct memory.",
|
||||||
|
is_neo ? "2 GB" : "768 MB");
|
||||||
|
LOG_WARNING(Kernel_Vmm, "Old Direct Size: {:#x} -> New Direct Size: {:#x}", old_size,
|
||||||
|
total_size);
|
||||||
|
}
|
||||||
if (!use_extended_mem1 && is_neo) {
|
if (!use_extended_mem1 && is_neo) {
|
||||||
total_size -= 256_MB;
|
total_size -= 256_MB;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue