mirror of https://github.com/OpenRCT2/OpenRCT2.git
Rename WINDOW_LIMIT_RESERVED to kWindowLimitReserved
This commit is contained in:
parent
9e2b45fab3
commit
8ce6ba7606
|
@ -224,8 +224,8 @@ WindowBase* WindowCreate(
|
|||
}
|
||||
|
||||
// Check if there are any window slots left
|
||||
// include WINDOW_LIMIT_RESERVED for items such as the main viewport and toolbars to not appear to be counted.
|
||||
if (g_window_list.size() >= static_cast<size_t>(gConfigGeneral.WindowLimit + WINDOW_LIMIT_RESERVED))
|
||||
// include kWindowLimitReserved for items such as the main viewport and toolbars to not appear to be counted.
|
||||
if (g_window_list.size() >= static_cast<size_t>(gConfigGeneral.WindowLimit + kWindowLimitReserved))
|
||||
{
|
||||
// Close least recently used window
|
||||
for (auto& w : g_window_list)
|
||||
|
|
|
@ -164,7 +164,7 @@ static void WindowCloseSurplus(int32_t cap, WindowClass avoid_classification)
|
|||
// find the amount of windows that are currently open
|
||||
auto count = static_cast<int32_t>(g_window_list.size());
|
||||
// difference between amount open and cap = amount to close
|
||||
auto diff = count - WINDOW_LIMIT_RESERVED - cap;
|
||||
auto diff = count - kWindowLimitReserved - cap;
|
||||
for (auto i = 0; i < diff; i++)
|
||||
{
|
||||
// iterates through the list until it finds the newest window, or a window that can be closed
|
||||
|
|
|
@ -484,7 +484,7 @@ using close_callback = void (*)();
|
|||
|
||||
constexpr int8_t kWindowLimitMin = 4;
|
||||
constexpr int8_t kWindowLimitMax = 64;
|
||||
#define WINDOW_LIMIT_RESERVED 4 // Used to reserve room for the main viewport, toolbars, etc.
|
||||
constexpr int8_t kWindowLimitReserved = 4; // Used to reserve room for the main viewport, toolbars, etc.
|
||||
|
||||
extern WindowBase* gWindowAudioExclusive;
|
||||
|
||||
|
|
Loading…
Reference in New Issue