simon-git: puzzles (main): Ben Harris

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Wed Nov 9 20:58:47 GMT 2022


TL;DR:
  e45cd43 Teach the mid-end about device pixel ratios
  ad9ee5a js: Move much of the handling of device pixel ratios to the mid-end

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-09 20:58:47

commit e45cd43aaab7af014607b2578ec68a5bbec1b609
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=e45cd43aaab7af014607b2578ec68a5bbec1b609;hp=fba22f04d684dfb14d1f74c12ba71dd0b2f7be32
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Mon Nov 7 21:42:38 2022 +0000

    Teach the mid-end about device pixel ratios
    
    The device pixel ratio indicates how many physical pixels there are in
    the platonic ideal of a pixel, at least approximately.  In Web browsers,
    the device pixel ratio is used to represent "retina" displays with
    particularly high pixel densities, and also to reflect user-driven
    zooming of the page to different text sizes.
    
    The mid-end uses the device pixel ratio to adjust the tile size at
    startup, and can also respond to changes in device pixel ratio by
    adjusting the time size later.  This is accomplished through a new
    argument to midend_size() which can simply be passed as 1.0 in any front
    end that doesn't care about this.

 devel.but  | 20 +++++++++++++++++++-
 emcc.c     |  6 +++---
 gtk.c      |  4 ++--
 midend.c   | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++----
 nestedvm.c |  4 ++--
 osx.m      |  6 +++---
 puzzles.h  |  3 ++-
 windows.c  |  8 ++++----
 8 files changed, 87 insertions(+), 20 deletions(-)

commit ad9ee5a52470b864f6914ba9b5c2c9ae2d6ab072
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=ad9ee5a52470b864f6914ba9b5c2c9ae2d6ab072;hp=e45cd43aaab7af014607b2578ec68a5bbec1b609
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Mon Nov 7 23:02:06 2022 +0000

    js: Move much of the handling of device pixel ratios to the mid-end
    
    Now that the mid-end knows how to do it, we can remove some complexity
    from the front end.

 emcc.c     | 57 +++++++++++++++++++--------------------------------------
 emcclib.js | 16 ----------------
 emccpre.js | 11 ++---------
 3 files changed, 21 insertions(+), 63 deletions(-)



More information about the tartarus-commits mailing list