1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2025-12-10 06:52:05 +01:00

Fix #14549: changing interface scale could underflow map zoom

This commit is contained in:
Rubidium
2025-09-24 21:13:43 +02:00
committed by rubidium42
parent 910eeef17f
commit 5e7cb08411

View File

@@ -12,8 +12,12 @@
#include "core/enum_type.hpp"
/** All zoom levels we know. */
enum class ZoomLevel : uint8_t {
/**
* All zoom levels we know.
*
* The underlying type is signed so subtract-and-Clamp works without need for casting.
*/
enum class ZoomLevel : int8_t {
/* Our possible zoom-levels */
Begin = 0, ///< Begin for iteration.
Min = Begin, ///< Minimum zoom level.