Rename WINDOW_LIMIT_MAX to kWindowLimitMax

This commit is contained in:
Harry-Hopkinson 2024-04-26 15:35:42 +00:00 committed by Harry Hopkinson
parent 343b10c172
commit 9e2b45fab3
4 changed files with 4 additions and 4 deletions

View File

@ -217,7 +217,7 @@ namespace Config
model->LastSaveScenarioDirectory = reader->GetString("last_scenario_directory", "");
model->LastSaveTrackDirectory = reader->GetString("last_track_directory", "");
model->UseNativeBrowseDialog = reader->GetBoolean("use_native_browse_dialog", false);
model->WindowLimit = reader->GetInt32("window_limit", WINDOW_LIMIT_MAX);
model->WindowLimit = reader->GetInt32("window_limit", kWindowLimitMax);
model->ZoomToCursor = reader->GetBoolean("zoom_to_cursor", true);
model->RenderWeatherEffects = reader->GetBoolean("render_weather_effects", true);
model->RenderWeatherGloom = reader->GetBoolean("render_weather_gloom", true);

View File

@ -114,7 +114,7 @@ struct InteractionInfo
ViewportInteractionItem SpriteType = ViewportInteractionItem::None;
};
constexpr int32_t kMaxViewportCount = WINDOW_LIMIT_MAX;
constexpr int32_t kMaxViewportCount = kWindowLimitMax;
/**
* A reference counter for whether something is forcing the grid lines to show. When the counter

View File

@ -194,7 +194,7 @@ static void WindowCloseSurplus(int32_t cap, WindowClass avoid_classification)
void WindowSetWindowLimit(int32_t value)
{
int32_t prev = gConfigGeneral.WindowLimit;
int32_t val = std::clamp<int32_t>(value, kWindowLimitMin, WINDOW_LIMIT_MAX);
int32_t val = std::clamp<int32_t>(value, kWindowLimitMin, kWindowLimitMax);
gConfigGeneral.WindowLimit = val;
ConfigSaveDefault();
// Checks if value decreases and then closes surplus

View File

@ -483,7 +483,7 @@ using modal_callback = void (*)(int32_t result);
using close_callback = void (*)();
constexpr int8_t kWindowLimitMin = 4;
#define WINDOW_LIMIT_MAX 64
constexpr int8_t kWindowLimitMax = 64;
#define WINDOW_LIMIT_RESERVED 4 // Used to reserve room for the main viewport, toolbars, etc.
extern WindowBase* gWindowAudioExclusive;