From 06d5705ae61f627410e4934e99f0a4c9e0858683 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 30 Nov 2019 23:45:43 +0100 Subject: [PATCH] - formatting fix and null check for aborted transition. --- source/common/menu/imagescroller.cpp | 2 +- source/common/menu/loadsavemenu.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/common/menu/imagescroller.cpp b/source/common/menu/imagescroller.cpp index 8fabd1360..8193ab80b 100644 --- a/source/common/menu/imagescroller.cpp +++ b/source/common/menu/imagescroller.cpp @@ -112,7 +112,7 @@ bool DImageScrollerMenu::MenuEvent(int mkey, bool fromcontroller) case MKEY_Back: // Before going back the currently running transition must be terminated. pageTransition.previous = nullptr; - pageTransition.current->origin = { 0,0 }; + if (pageTransition.current) pageTransition.current->origin = { 0,0 }; return DMenu::MenuEvent(mkey, fromcontroller); case MKEY_Left: diff --git a/source/common/menu/loadsavemenu.cpp b/source/common/menu/loadsavemenu.cpp index 0ad22f5f9..4e7ba7291 100644 --- a/source/common/menu/loadsavemenu.cpp +++ b/source/common/menu/loadsavemenu.cpp @@ -130,7 +130,8 @@ protected: commentHeight = listboxHeight - savepicHeight - (16 * wScale); commentRight = commentLeft + commentWidth; commentBottom = commentTop + commentHeight; - commentRows = commentHeight / rowHeight; + commentRows = commentHeight / rowHeight; + UpdateSaveComment(); } //============================================================================= @@ -252,7 +253,7 @@ protected: void UpdateSaveComment() { - //BrokenSaveComment = NewConsoleFont.BreakLines(manager.SaveCommentString, int(commentWidth / FontScale)); + BrokenSaveComment = V_BreakLines(NewConsoleFont, int(commentWidth / FontScale), savegameManager.SaveCommentString); } //=============================================================================