diff options
| author | Simon Tatham <anakin@pobox.com> | 2022-01-08 14:27:07 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2022-01-08 14:33:12 +0000 |
| commit | cb6cead7a905eeb00b861f45e6f2c3f0cc60105d (patch) | |
| tree | 8fe7a66567f273a8b2ff827a9837909adf1cecc6 | |
| parent | efbb2e3a31b16d34e060de633c5083c662a9ddac (diff) | |
| download | puzzles-cb6cead7a905eeb00b861f45e6f2c3f0cc60105d.zip puzzles-cb6cead7a905eeb00b861f45e6f2c3f0cc60105d.tar.gz puzzles-cb6cead7a905eeb00b861f45e6f2c3f0cc60105d.tar.bz2 puzzles-cb6cead7a905eeb00b861f45e6f2c3f0cc60105d.tar.xz | |
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.
| -rw-r--r-- | windows.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -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, |