diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2022-11-07 23:05:56 +0000 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2022-11-08 00:57:32 +0000 |
| commit | fba22f04d684dfb14d1f74c12ba71dd0b2f7be32 (patch) | |
| tree | bf018e1fb6d94326f0933f77d002dd51221ab450 /nestedvm.c | |
| parent | 289342ec338e0eeb2213d0a4cf93531c31bff1ce (diff) | |
| download | puzzles-fba22f04d684dfb14d1f74c12ba71dd0b2f7be32.zip puzzles-fba22f04d684dfb14d1f74c12ba71dd0b2f7be32.tar.gz puzzles-fba22f04d684dfb14d1f74c12ba71dd0b2f7be32.tar.bz2 puzzles-fba22f04d684dfb14d1f74c12ba71dd0b2f7be32.tar.xz | |
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.
Diffstat (limited to 'nestedvm.c')
0 files changed, 0 insertions, 0 deletions