aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/gui_v2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/kyra/gui_v2.cpp')
-rw-r--r--engines/kyra/gui_v2.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp
index 0b82df8cd5..f086ef368f 100644
--- a/engines/kyra/gui_v2.cpp
+++ b/engines/kyra/gui_v2.cpp
@@ -457,6 +457,15 @@ void GUI_v2::setupSavegameNames(Menu &menu, int num) {
Common::strlcpy(s, header.description.c_str(), 80);
Util::convertISOToDOS(s);
+ // Trim long GMM save descriptions to fit our save slots
+ _screen->_charWidth = -2;
+ int fC = _screen->getTextWidth(s);
+ while (strlen(s) && fC > 240) {
+ s[strlen(s) - 1] = 0;
+ fC = _screen->getTextWidth(s);
+ }
+ _screen->_charWidth = 0;
+
menu.item[i].saveSlot = _saveSlots[i + _savegameOffset];
menu.item[i].enabled = true;
delete in;