shithub: misc

Download patch

ref: ace7b13ccd4af5c5a6c15509e47fe72c295b6807
parent: 4e7da28c9aec8d91f9484a55b19c762d828a34f3
author: Philip Silva <philip.silva@protonmail.com>
date: Fri Oct 1 05:45:18 EDT 2021

configure dpi in plan9.cfg

--- a/README
+++ b/README
@@ -1,5 +1,6 @@
 Various unsorted stuff
 
-- hidpi-1.patch: wip from p9p to add dpi field to Display
+- hidpi-1.patch: wip from p9p to add dpi field to Display (libdraw changes don't work yet)
               (p9p commit d0e0701913f3aede1fcb256f3d1e9c60c9a)
+- hidpi-2.patch: be able to configure dpi via plan9.cfg
 - acme-at.patch: can be applied to open paths containing @s (e.g. the internal Go module paths)
--- /dev/null
+++ b/hidpi-2.patch
@@ -1,0 +1,22 @@
+diff c7dcc82b0be805717efbe77c98eaadf3ee1e31af uncommitted
+--- a/sys/src/9/port/devdraw.c
++++ b/sys/src/9/port/devdraw.c
+@@ -765,6 +765,7 @@
+ drawnewclient(void)
+ {
+ 	Client *cl, **cp;
++	char *p;
+ 	int i;
+ 
+ 	for(i=0; i<sdraw.nclient; i++){
+@@ -789,7 +790,9 @@
+ 	cl->slot = i;
+ 	cl->clientid = ++sdraw.clientid;
+ 	cl->op = SoverD;
+-	cl->displaydpi=100;
++	if((p = getconf("dpi")) == nil || (cl->displaydpi = atoi(p)) == 0) {
++		cl->displaydpi=100;
++	}
+ 	sdraw.client[i] = cl;
+ 	return cl;
+ }
\ No newline at end of file