diff options
author | Paul Gilbert | 2019-01-02 19:09:40 -0800 |
---|---|---|
committer | Paul Gilbert | 2019-01-02 19:09:40 -0800 |
commit | 313337eb82534b23afd31da5c205f96faaea9e24 (patch) | |
tree | 41b7a5a0ac1198c5278331f33a4ea8aea8c2cdda /engines/glk/windows.cpp | |
parent | f1d9722f3bd58f7883f3e76c19d4a0133da73489 (diff) | |
download | scummvm-rg350-313337eb82534b23afd31da5c205f96faaea9e24.tar.gz scummvm-rg350-313337eb82534b23afd31da5c205f96faaea9e24.tar.bz2 scummvm-rg350-313337eb82534b23afd31da5c205f96faaea9e24.zip |
GLK: Remove deprecated _cellW/_cellH from Conf
Diffstat (limited to 'engines/glk/windows.cpp')
-rw-r--r-- | engines/glk/windows.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/glk/windows.cpp b/engines/glk/windows.cpp index d75ba1f6e5..c8ab44768d 100644 --- a/engines/glk/windows.cpp +++ b/engines/glk/windows.cpp @@ -76,7 +76,7 @@ Windows::~Windows() { Window *Windows::windowOpen(Window *splitwin, uint method, uint size, uint wintype, uint rock) { - Window *newwin, *oldparent; + Window *newwin, *oldparent = nullptr; PairWindow *pairWin; uint val; @@ -262,21 +262,22 @@ PairWindow *Windows::newPairWindow(uint method, Window *key, uint size) { void Windows::rearrange() { if (_rootWin) { Rect box; + Point cell(g_conf->_monoInfo._cellW, g_conf->_monoInfo._cellH); if (g_conf->_lockCols) { - int desired_width = g_conf->_wMarginSaveX * 2 + g_conf->_cellW * g_conf->_cols; + int desired_width = g_conf->_wMarginSaveX * 2 + cell.x * g_conf->_cols; if (desired_width > g_conf->_imageW) g_conf->_wMarginX = g_conf->_wMarginSaveX; else - g_conf->_wMarginX = (g_conf->_imageW - g_conf->_cellW * g_conf->_cols) / 2; + g_conf->_wMarginX = (g_conf->_imageW - cell.x * g_conf->_cols) / 2; } if (g_conf->_lockRows) { - int desired_height = g_conf->_wMarginSaveY * 2 + g_conf->_cellH * g_conf->_rows; + int desired_height = g_conf->_wMarginSaveY * 2 + cell.y * g_conf->_rows; if (desired_height > g_conf->_imageH) g_conf->_wMarginY = g_conf->_wMarginSaveY; else - g_conf->_wMarginY = (g_conf->_imageH - g_conf->_cellH * g_conf->_rows) / 2; + g_conf->_wMarginY = (g_conf->_imageH - cell.y * g_conf->_rows) / 2; } box.left = g_conf->_wMarginX; |