vsync, integer scale

This commit is contained in:
2026-04-05 01:31:02 +02:00
parent 788a883c71
commit 22ee9538a2
7 changed files with 24 additions and 0 deletions

View File

@@ -32,6 +32,7 @@ namespace Defaults::Video {
constexpr bool SHADER_ENABLED = false;
constexpr bool SUPERSAMPLING = false;
constexpr bool INTEGER_SCALE = true;
constexpr bool VSYNC = true;
constexpr bool ASPECT_RATIO_4_3 = true; // CRT original estira 200→240
constexpr bool STRETCH_FILTER_LINEAR = false; // Filtre per a l'estirament 4:3 (false=NEAREST)
constexpr int DOWNSCALE_ALGO = 1; // 0=bilinear, 1=Lanczos2, 2=Lanczos3

View File

@@ -65,6 +65,8 @@ namespace Options {
video.supersampling = node["supersampling"].get_value<bool>();
if (node.contains("integer_scale"))
video.integer_scale = node["integer_scale"].get_value<bool>();
if (node.contains("vsync"))
video.vsync = node["vsync"].get_value<bool>();
if (node.contains("aspect_ratio_4_3"))
video.aspect_ratio_4_3 = node["aspect_ratio_4_3"].get_value<bool>();
if (node.contains("stretch_filter_linear"))
@@ -220,6 +222,7 @@ namespace Options {
file << " shader_enabled: " << (video.shader_enabled ? "true" : "false") << "\n";
file << " supersampling: " << (video.supersampling ? "true" : "false") << "\n";
file << " integer_scale: " << (video.integer_scale ? "true" : "false") << "\n";
file << " vsync: " << (video.vsync ? "true" : "false") << "\n";
file << " aspect_ratio_4_3: " << (video.aspect_ratio_4_3 ? "true" : "false") << "\n";
file << " stretch_filter_linear: " << (video.stretch_filter_linear ? "true" : "false") << " # filtre 4:3: false=nearest, true=linear\n";
file << " downscale_algo: " << video.downscale_algo << " # 0=bilinear, 1=Lanczos2, 2=Lanczos3\n";

View File

@@ -44,6 +44,7 @@ namespace Options {
bool shader_enabled{Defaults::Video::SHADER_ENABLED};
bool supersampling{Defaults::Video::SUPERSAMPLING};
bool integer_scale{Defaults::Video::INTEGER_SCALE};
bool vsync{Defaults::Video::VSYNC};
bool aspect_ratio_4_3{Defaults::Video::ASPECT_RATIO_4_3};
bool stretch_filter_linear{Defaults::Video::STRETCH_FILTER_LINEAR};
int downscale_algo{Defaults::Video::DOWNSCALE_ALGO};