mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
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.
This commit is contained in:
@ -299,7 +299,8 @@ void midend_free(midend *me);
|
||||
const game *midend_which_game(midend *me);
|
||||
void midend_set_params(midend *me, game_params *params);
|
||||
game_params *midend_get_params(midend *me);
|
||||
void midend_size(midend *me, int *x, int *y, bool user_size);
|
||||
void midend_size(midend *me, int *x, int *y, bool user_size,
|
||||
double device_pixel_ratio);
|
||||
void midend_reset_tilesize(midend *me);
|
||||
void midend_new_game(midend *me);
|
||||
void midend_restart_game(midend *me);
|
||||
|
Reference in New Issue
Block a user