limit message display frames to 120 (fixes #852)

This commit is contained in:
Thomas Jentzsch 2021-12-11 23:13:35 +01:00
parent 64e5b1362b
commit 8cee3c5667
1 changed files with 1 additions and 1 deletions

View File

@ -616,7 +616,7 @@ void FrameBuffer::createMessage(const string& message, MessagePosition position,
const int fontHeight = font().getFontHeight(); const int fontHeight = font().getFontHeight();
const int VBORDER = fontHeight / 4; const int VBORDER = fontHeight / 4;
myMsg.counter = uInt32(myOSystem.frameRate()) * 2; // Show message for 2 seconds myMsg.counter = std::min(uInt32(myOSystem.frameRate()) * 2, 120u); // Show message for 2 seconds
if(myMsg.counter == 0) if(myMsg.counter == 0)
myMsg.counter = 120; myMsg.counter = 120;