From d5bf1396def859fcdbfc541e19df37f1dca5552c Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 3 Jan 2019 18:01:32 -0800 Subject: GLK: FROTZ: os_picture_data wasn't dividing by cell size --- engines/glk/frotz/glk_interface.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'engines/glk') diff --git a/engines/glk/frotz/glk_interface.cpp b/engines/glk/frotz/glk_interface.cpp index 0f08799fc9..1efb751a17 100644 --- a/engines/glk/frotz/glk_interface.cpp +++ b/engines/glk/frotz/glk_interface.cpp @@ -291,7 +291,14 @@ bool GlkInterface::os_picture_data(int picture, uint *height, uint *width) { *height = _pics->size(); return true; } else { - return glk_image_get_info(picture, width, height); + bool result = glk_image_get_info(picture, width, height); + + int cellW = g_conf->_monoInfo._cellW; + int cellH = g_conf->_monoInfo._cellH; + *width = (*width + cellW - 1) / cellW; + *height = (*height + cellH - 1) / cellH; + + return result; } } -- cgit v1.2.3