Better screen layout support

This commit is contained in:
wheremyfoodat
2025-07-06 02:41:44 +03:00
parent 1c0f65c740
commit cf321b1ed8
17 changed files with 328 additions and 186 deletions

View File

@@ -93,6 +93,10 @@ void EmulatorConfig::load() {
lightShadergenThreshold = toml::find_or<toml::integer>(gpu, "ShadergenLightThreshold", 1);
hashTextures = toml::find_or<toml::boolean>(gpu, "HashTextures", hashTexturesDefault);
enableRenderdoc = toml::find_or<toml::boolean>(gpu, "EnableRenderdoc", false);
auto screenLayoutName = toml::find_or<std::string>(gpu, "ScreenLayout", "Default");
screenLayout = ScreenLayout::layoutFromString(screenLayoutName);
topScreenSize = float(std::clamp(toml::find_or<toml::floating>(gpu, "TopScreenSize", 0.5), 0.0, 1.0));
}
}
@@ -194,6 +198,8 @@ void EmulatorConfig::save() {
data["GPU"]["AccelerateShaders"] = accelerateShaders;
data["GPU"]["EnableRenderdoc"] = enableRenderdoc;
data["GPU"]["HashTextures"] = hashTextures;
data["GPU"]["ScreenLayout"] = std::string(ScreenLayout::layoutToString(screenLayout));
data["GPU"]["TopScreenSize"] = double(topScreenSize);
data["Audio"]["DSPEmulation"] = std::string(Audio::DSPCore::typeToString(dspType));
data["Audio"]["EnableAudio"] = audioEnabled;