treballant en internal resolution

This commit is contained in:
2026-04-16 20:53:13 +02:00
parent 5cda8fc3f9
commit 16a3f5b470
10 changed files with 227 additions and 7 deletions

View File

@@ -20,6 +20,7 @@ namespace Defaults::Video {
constexpr bool VSYNC = true;
constexpr bool ASPECT_RATIO_4_3 = false; // CRT original estira 200→240
constexpr int DOWNSCALE_ALGO = 1; // 0=bilinear, 1=Lanczos2, 2=Lanczos3
constexpr int INTERNAL_RESOLUTION = 1; // Multiplicador enter de la textura font abans del pipeline
// TextureFilter i ScalingMode viuen a Options (requereixen #include, evitem dependència circular).
} // namespace Defaults::Video

View File

@@ -141,6 +141,10 @@ namespace Options {
}
if (node.contains("downscale_algo"))
video.downscale_algo = node["downscale_algo"].get_value<int>();
if (node.contains("internal_resolution")) {
video.internal_resolution = node["internal_resolution"].get_value<int>();
if (video.internal_resolution < 1) video.internal_resolution = 1;
}
if (node.contains("current_shader"))
video.current_shader = node["current_shader"].get_value<std::string>();
if (node.contains("current_postfx_preset"))
@@ -298,6 +302,7 @@ namespace Options {
file << " aspect_ratio_4_3: " << (video.aspect_ratio_4_3 ? "true" : "false") << "\n";
file << " texture_filter: " << (video.texture_filter == TextureFilter::LINEAR ? "linear" : "nearest") << " # nearest|linear\n";
file << " downscale_algo: " << video.downscale_algo << " # 0=bilinear, 1=Lanczos2, 2=Lanczos3\n";
file << " internal_resolution: " << video.internal_resolution << " # multiplicador enter font, clampat a max_zoom\n";
file << " current_shader: " << video.current_shader << "\n";
file << " current_postfx_preset: " << video.current_postfx_preset << "\n";
file << " current_crtpi_preset: " << video.current_crtpi_preset << "\n";

View File

@@ -45,6 +45,7 @@ namespace Options {
bool aspect_ratio_4_3{Defaults::Video::ASPECT_RATIO_4_3};
TextureFilter texture_filter{TextureFilter::NEAREST};
int downscale_algo{Defaults::Video::DOWNSCALE_ALGO};
int internal_resolution{Defaults::Video::INTERNAL_RESOLUTION}; // Multiplicador enter ≥ 1, clampat a max_zoom
std::string current_shader{"postfx"}; // "postfx" o "crtpi"
std::string current_postfx_preset{"CRT"}; // Nom del preset PostFX actiu
std::string current_crtpi_preset{"DEFAULT"}; // Nom del preset CrtPi actiu