Skip to content

Commit

Permalink
fix scaling autodetect for manual input
Browse files Browse the repository at this point in the history
  • Loading branch information
nbusseneau committed Dec 29, 2022
1 parent 6097da1 commit cfb9835
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Fix scaling algorithm autodetection when using manual resolution input in interactive mode.

## [1.7.7] - 2022-12-14

### Fixed
Expand Down
8 changes: 7 additions & 1 deletion hephaistos/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,13 @@ def __interactive_patch_handler(self, raw_args) -> None:
},
}
scaling = self.__interactive_pick_scaling(enabled=args[aspect_ratio][enabled], recommended=args[aspect_ratio][recommended])
raw_args += ['--scaling', scaling]
# this is a kludge to allow manual selection of `Scaling.AUTODETECT`
# we can't pass `Scaling.AUTODETECT`` to `--scaling` because it's not
# one of the values allowed by `argparse.choices`, however, since
# `Scaling.AUTODETECT` is the `argparse.default` value, not passing
# anything does what we want
if scaling != Scaling.AUTODETECT:
raw_args += ['--scaling', scaling]

recommended = {
AspectRatio._16_10: HUD.EXPAND,
Expand Down

0 comments on commit cfb9835

Please sign in to comment.