Config: Add integer scaling options

This commit is contained in:
Amaryllis Kulla 2021-12-07 07:10:45 +01:00
parent ca71e6ecb7
commit f6db7be538
3 changed files with 32 additions and 0 deletions

View File

@ -150,6 +150,30 @@
# maxTextureSize=0 # maxTextureSize=0
# Scale up the game screen by an integer amount,
# as large as the current window size allows, before
# doing any last additional scalings to fill part or
# all of the remaining window space (or none at all
# if lastMileScaling is disabled).
# If fixedAspectRatio is disabled, the integer scale
# factors in horizontal and vertical direction can differ
# depending on how much space is available, otherwise
# they are forced to the smaller of the two.
# (default: disabled)
#
# integerScaling.active = false
# When integer scaling is enabled, this option controls
# whether the scaled game screen is further scaled
# (with linear interpolation when smoothScaling is enabled)
# to fill the rest of the game window.
# Note that this option still respects fixedAspectRatio.
# (default: enabled)
#
# integerScaling.lastMileScaling = true
# Set the base path of the game to '/path/to/game' # Set the base path of the game to '/path/to/game'
# (default: executable directory) # (default: executable directory)
# #

View File

@ -170,6 +170,8 @@ void Config::read(int argc, char *argv[])
PO_DESC(subImageFix, bool, false) \ PO_DESC(subImageFix, bool, false) \
PO_DESC(enableBlitting, bool, true) \ PO_DESC(enableBlitting, bool, true) \
PO_DESC(maxTextureSize, int, 0) \ PO_DESC(maxTextureSize, int, 0) \
PO_DESC(integerScaling.active, bool, false) \
PO_DESC(integerScaling.lastMileScaling, bool, true) \
PO_DESC(gameFolder, std::string, ".") \ PO_DESC(gameFolder, std::string, ".") \
PO_DESC(anyAltToggleFS, bool, false) \ PO_DESC(anyAltToggleFS, bool, false) \
PO_DESC(enableReset, bool, true) \ PO_DESC(enableReset, bool, true) \

View File

@ -59,6 +59,12 @@ struct Config
bool enableBlitting; bool enableBlitting;
int maxTextureSize; int maxTextureSize;
struct
{
bool active;
bool lastMileScaling;
} integerScaling;
std::string gameFolder; std::string gameFolder;
bool anyAltToggleFS; bool anyAltToggleFS;
bool enableReset; bool enableReset;