From cb6cead7a905eeb00b861f45e6f2c3f0cc60105d Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 8 Jan 2022 14:27:07 +0000 Subject: [PATCH] windows.c: fix some mis-indented pieces of code. I happened to run across one of these on my way somewhere else and thought I'd fix it in passing. --- windows.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/windows.c b/windows.c index 844d96b..2f28149 100644 --- a/windows.c +++ b/windows.c @@ -91,8 +91,8 @@ void dputs(char *buf) WriteFile(debug_hdl, buf, strlen(buf), &dw, NULL); } if (debug_fp) { - fputs(buf, debug_fp); - fflush(debug_fp); + fputs(buf, debug_fp); + fflush(debug_fp); }*/ OutputDebugString(buf); } @@ -2376,9 +2376,9 @@ static void new_game_size(frontend *fe, float scale) midend_size(fe->me, &x, &y, false); if (scale != 1.0) { - x = (int)((float)x * fe->puzz_scale); - y = (int)((float)y * fe->puzz_scale); - midend_size(fe->me, &x, &y, true); + x = (int)((float)x * fe->puzz_scale); + y = (int)((float)y * fe->puzz_scale); + midend_size(fe->me, &x, &y, true); } fe->ymin = (fe->xmin * y) / x; @@ -2431,13 +2431,13 @@ static void adjust_game_size(frontend *fe, RECT *proposed, bool isedge, ydiff = (proposed->bottom - proposed->top) - (wr.bottom - wr.top); if (isedge) { - /* These next four lines work around the fact that midend_size - * is happy to shrink _but not grow_ if you change one dimension - * but not the other. */ - if (xdiff > 0 && ydiff == 0) - ydiff = (xdiff * (wr.right - wr.left)) / (wr.bottom - wr.top); - if (xdiff == 0 && ydiff > 0) - xdiff = (ydiff * (wr.bottom - wr.top)) / (wr.right - wr.left); + /* These next four lines work around the fact that midend_size + * is happy to shrink _but not grow_ if you change one dimension + * but not the other. */ + if (xdiff > 0 && ydiff == 0) + ydiff = (xdiff * (wr.right - wr.left)) / (wr.bottom - wr.top); + if (xdiff == 0 && ydiff > 0) + xdiff = (ydiff * (wr.bottom - wr.top)) / (wr.right - wr.left); } if (check_window_resize(fe,