mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-05 06:21:19 +12:00
add an option to use the host memory instead of buffer cache
This commit is contained in:
parent
ab41de4f9f
commit
03d4e86b61
6 changed files with 26 additions and 9 deletions
|
@ -127,7 +127,7 @@ bool gameProfile_loadIntegerOption(IniParser& iniParser, const char* optionName,
|
|||
{
|
||||
cemuLog_log(LogType::Force, "Value '{}' is out of range for option '{}' in game profile", *option_value, optionName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
@ -224,8 +224,9 @@ bool GameProfile::Load(uint64_t title_id)
|
|||
gameProfile_loadIntegerOption(&iniParser, "graphics_api", &graphicsApi, -1, 0, 1);
|
||||
if (graphicsApi.value != -1)
|
||||
m_graphics_api = (GraphicAPI)graphicsApi.value;
|
||||
|
||||
|
||||
gameProfile_loadEnumOption(iniParser, "accurateShaderMul", m_accurateShaderMul);
|
||||
gameProfile_loadBooleanOption2(iniParser, "useHostMemForCache", m_useHostMemForCache);
|
||||
|
||||
// legacy support
|
||||
auto option_precompiledShaders = iniParser.FindOption("precompiledShaders");
|
||||
|
@ -277,7 +278,7 @@ bool GameProfile::Load(uint64_t title_id)
|
|||
void GameProfile::Save(uint64_t title_id)
|
||||
{
|
||||
auto gameProfileDir = ActiveSettings::GetConfigPath("gameProfiles");
|
||||
if (std::error_code ex_ec; !fs::exists(gameProfileDir, ex_ec))
|
||||
if (std::error_code ex_ec; !fs::exists(gameProfileDir, ex_ec))
|
||||
fs::create_directories(gameProfileDir, ex_ec);
|
||||
auto gameProfilePath = gameProfileDir / fmt::format("{:016x}.ini", title_id);
|
||||
FileStream* fs = FileStream::createFile2(gameProfilePath);
|
||||
|
@ -308,6 +309,7 @@ void GameProfile::Save(uint64_t title_id)
|
|||
|
||||
fs->writeLine("[Graphics]");
|
||||
WRITE_ENTRY(accurateShaderMul);
|
||||
WRITE_ENTRY(useHostMemForCache);
|
||||
WRITE_OPTIONAL_ENTRY(precompiledShaders);
|
||||
WRITE_OPTIONAL_ENTRY(graphics_api);
|
||||
fs->writeLine("");
|
||||
|
@ -337,6 +339,7 @@ void GameProfile::ResetOptional()
|
|||
|
||||
// graphic settings
|
||||
m_accurateShaderMul = AccurateShaderMulOption::True;
|
||||
m_useHostMemForCache = false;
|
||||
// cpu settings
|
||||
m_threadQuantum = kThreadQuantumDefault;
|
||||
m_cpuMode.reset(); // CPUModeOption::kSingleCoreRecompiler;
|
||||
|
@ -354,9 +357,10 @@ void GameProfile::Reset()
|
|||
// general settings
|
||||
m_loadSharedLibraries = true;
|
||||
m_startWithPadView = false;
|
||||
|
||||
|
||||
// graphic settings
|
||||
m_accurateShaderMul = AccurateShaderMulOption::True;
|
||||
m_useHostMemForCache = false;
|
||||
m_precompiledShaders = PrecompiledShaderOption::Auto;
|
||||
// cpu settings
|
||||
m_threadQuantum = kThreadQuantumDefault;
|
||||
|
@ -366,4 +370,4 @@ void GameProfile::Reset()
|
|||
// controller settings
|
||||
for (auto& profile : m_controllerProfile)
|
||||
profile.reset();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue