arreglos en Console i SS

This commit is contained in:
2026-03-29 14:24:20 +02:00
parent d6ecadfd3a
commit 2fe79de1d8
3 changed files with 7 additions and 6 deletions

View File

@@ -80,7 +80,8 @@ void RenderInfo::render() const {
preset_name = Options::postfx_presets[static_cast<size_t>(Options::current_postfx_preset)].name; preset_name = Options::postfx_presets[static_cast<size_t>(Options::current_postfx_preset)].name;
} }
} }
line += " | " + SHADER_NAME + " " + preset_name + (Options::video.supersampling ? " (ss)" : ""); const bool SHOW_SS = Options::video.supersampling && !IS_CRTPI;
line += " | " + SHADER_NAME + " " + preset_name + (SHOW_SS ? " (ss)" : "");
} }
// Todo en lowercase // Todo en lowercase

View File

@@ -114,24 +114,24 @@ static const std::vector<ConsoleCommand> COMMANDS = {
// SS [ON|OFF|SIZE] — Supersampling // SS [ON|OFF|SIZE] — Supersampling
{.keyword = "SS", .execute = [](const std::vector<std::string>& args) -> std::string { {.keyword = "SS", .execute = [](const std::vector<std::string>& args) -> std::string {
if (!args.empty() && args[0] == "SIZE") { if (!args.empty() && args[0] == "SIZE") {
if (!Options::video.supersampling) { return "Supersampling OFF"; } if (!Options::video.supersampling) { return "Supersampling is OFF: no texture"; }
const auto [w, h] = Screen::get()->getSsTextureSize(); const auto [w, h] = Screen::get()->getSsTextureSize();
if (w == 0) { return "SS texture: not active"; } if (w == 0) { return "SS texture: not active"; }
return "SS texture: " + std::to_string(w) + "x" + std::to_string(h); return "SS texture: " + std::to_string(w) + "x" + std::to_string(h);
} }
if (args.empty()) { if (args.empty()) {
Screen::get()->toggleSupersampling(); Screen::get()->toggleSupersampling();
return std::string("Supersampling ") + (Options::video.supersampling ? "ON" : "OFF"); return std::string("PostFX Supersampling ") + (Options::video.supersampling ? "ON" : "OFF");
} }
if (args[0] == "ON") { if (args[0] == "ON") {
if (Options::video.supersampling) { return "Supersampling already ON"; } if (Options::video.supersampling) { return "Supersampling already ON"; }
Screen::get()->toggleSupersampling(); Screen::get()->toggleSupersampling();
return "Supersampling ON"; return "PostFX Supersampling ON";
} }
if (args[0] == "OFF") { if (args[0] == "OFF") {
if (!Options::video.supersampling) { return "Supersampling already OFF"; } if (!Options::video.supersampling) { return "Supersampling already OFF"; }
Screen::get()->toggleSupersampling(); Screen::get()->toggleSupersampling();
return "Supersampling OFF"; return "PostFX Supersampling OFF";
} }
return "Usage: SS [ON|OFF|SIZE]"; return "Usage: SS [ON|OFF|SIZE]";
}}, }},

View File

@@ -45,7 +45,7 @@ class Console {
// Constantes de consola // Constantes de consola
static constexpr std::string_view CONSOLE_NAME = "JDD Console"; static constexpr std::string_view CONSOLE_NAME = "JDD Console";
static constexpr std::string_view CONSOLE_VERSION = "v1.0"; static constexpr std::string_view CONSOLE_VERSION = "v1.0";
static constexpr int MAX_LINE_CHARS = 30; static constexpr int MAX_LINE_CHARS = 32;
static constexpr int MAX_HISTORY_SIZE = 20; static constexpr int MAX_HISTORY_SIZE = 20;
static constexpr float CURSOR_ON_TIME = 0.5F; static constexpr float CURSOR_ON_TIME = 0.5F;
static constexpr float CURSOR_OFF_TIME = 0.3F; static constexpr float CURSOR_OFF_TIME = 0.3F;