shithub: riscv

Download patch

ref: e4b842056c1b63bafae9b5b1347366955b757730
parent: 09c61204440ea7d23015b09f908e4105b68cc7b6
author: qwx <devnull@localhost>
date: Wed Jun 13 10:14:25 EDT 2018

emulators ui: don't drink and code

--- a/sys/src/games/eui.c
+++ b/sys/src/games/eui.c
@@ -192,11 +192,11 @@
 		scale = Dx(screen->r) / vwdx;
 		if(Dy(screen->r) / vwdy < scale)
 			scale = Dy(screen->r) / vwdy;
-		if(scale <= 0)
-			scale = 1;
-		else if(scale > 16)
-			scale = 16;
 	}
+	if(scale <= 0)
+		scale = 1;
+	else if(scale > 16)
+		scale = 16;
 	p = divpt(addpt(screen->r.min, screen->r.max), 2);
 	picr = Rpt(subpt(p, Pt(scale * vwdx/2, scale * vwdy/2)),
 		addpt(p, Pt(scale * vwdx/2, scale * vwdy/2)));