Afinada un poc mes la classe Options

This commit is contained in:
2025-02-23 20:02:55 +01:00
parent 2ee0c70319
commit 5bb5be9c33
4 changed files with 127 additions and 156 deletions

View File

@@ -208,13 +208,11 @@ void Screen::setVideoMode(int videoMode)
// Actualiza las opciones
options.video.mode = videoMode;
options.window.width = window_width_;
options.window.height = window_height_;
// Reinicia los shaders
if (options.video.shaders)
{
const std::string glsl_file = options.window.height == 192 ? "crtpi_192.glsl" : "crtpi_240.glsl";
const std::string glsl_file = window_height_ == 192 ? "crtpi_192.glsl" : "crtpi_240.glsl";
std::ifstream f(Asset::get()->get(glsl_file).c_str());
std::string source((std::istreambuf_iterator<char>(f)), std::istreambuf_iterator<char>());