simon-git: puzzles (main): Ben Harris
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Tue Nov 8 01:05:10 GMT 2022
TL;DR:
fba22f0 js: Make update_pixel_ratio() more robust
Repository: https://git.tartarus.org/simon/puzzles.git
On the web: https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: main
Committer: Ben Harris <bjh21 at bjh21.me.uk>
Date: 2022-11-08 01:05:10
commit fba22f04d684dfb14d1f74c12ba71dd0b2f7be32
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=fba22f04d684dfb14d1f74c12ba71dd0b2f7be32;hp=289342ec338e0eeb2213d0a4cf93531c31bff1ce
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date: Mon Nov 7 23:05:56 2022 +0000
js: Make update_pixel_ratio() more robust
With very small tile sizes, js_canvas_find_font_midpoint() can throw an
exception. When it was called from update_pixel_ratio(), this prevented
the new MediaQueryList from being created, which meant that the puzzle
stopped noticing changes of device pixel ratio.
Now update_pixel_ratio() establishes a new MediaQueryList before calling
rescale_puzzle(), so the exception can't break it. Catching the
exception properly would be even better, of course.
emccpre.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
More information about the tartarus-commits
mailing list