From ab9bfc048982680cce1c43d9df857dd0cb057ae2 Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Thu, 31 Jan 2002 00:16:32 +0000 Subject: [PATCH] bugfix: map position was calculated incorrectly when switching into fit-to-screen mode. --- win/win32/mhmap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/win/win32/mhmap.c b/win/win32/mhmap.c index 15d168443..36fb38f52 100644 --- a/win/win32/mhmap.c +++ b/win/win32/mhmap.c @@ -106,7 +106,8 @@ void mswin_map_stretch(HWND hWnd, LPSIZE lpsz, BOOL redraw) data->xPageSize = COLNO+1; /* disable scroll bar */ else data->xPageSize = wnd_size.cx/data->xScrTile; - if( wnd_size.cx/data->xScrTile >= COLNO ) { + + if( data->xPageSize >= COLNO ) { data->xPos = 0; GetNHApp()->bNoHScroll = TRUE; } else { @@ -128,7 +129,7 @@ void mswin_map_stretch(HWND hWnd, LPSIZE lpsz, BOOL redraw) else data->yPageSize = wnd_size.cy/data->yScrTile; - if( wnd_size.cy/data->yScrTile >= ROWNO ) { + if( data->yPageSize >= ROWNO ) { data->yPos = 0; GetNHApp()->bNoVScroll = TRUE; } else {