generate-alt-random: override detected width/height when --cols/--rows have been used

This ensures we have a valid width and height, that matches what the
PGO helper binary expects.
This commit is contained in:
Daniel Eklöf 2020-12-20 15:36:07 +01:00
parent 21cb4671a4
commit e9dea5bb9d
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -45,8 +45,10 @@ def main():
if opts.rows is not None:
lines = opts.rows
height = 15 * lines # PGO helper binary hardcodes cell height to 15px
if opts.cols is not None:
cols = opts.cols
width = 8 * cols # PGO help binary hardcodes cell width to 8px
# Number of characters to write to screen
count = 256 * 1024**1