From e1de9f0633fffc7cdb326f25bdff83a890c09223 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 19 Sep 2010 06:34:15 +0000 Subject: [PATCH] - fixed: The newly accelerated mousewheel scrolling code did not check for the end of the list and could scroll one item too far. It also incremented VisBottom by 3 instead of 2. - changed lock failsound lookup so that for each sound it tries to resolve it as a player sound before deciding if it is valid. SVN r2830 (trunk) --- src/g_shared/a_keys.cpp | 8 ++++++-- src/menu/optionmenu.cpp | 13 ++++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/g_shared/a_keys.cpp b/src/g_shared/a_keys.cpp index b0f76e4b25..1169acb885 100644 --- a/src/g_shared/a_keys.cpp +++ b/src/g_shared/a_keys.cpp @@ -451,8 +451,12 @@ bool P_CheckKeys (AActor *owner, int keynum, bool remote) { if (failsound[i] != 0) { - S_Sound (owner, CHAN_VOICE, failsound[i], 1, ATTN_NORM); - break; + int snd = S_FindSkinnedSound(owner, failsound[i]); + if (snd != 0) + { + S_Sound (owner, CHAN_VOICE, snd, 1, ATTN_NORM); + break; + } } } } diff --git a/src/menu/optionmenu.cpp b/src/menu/optionmenu.cpp index cebaf9c836..ff13d4b24e 100644 --- a/src/menu/optionmenu.cpp +++ b/src/menu/optionmenu.cpp @@ -146,9 +146,16 @@ bool DOptionMenu::Responder (event_t *ev) { if (CanScrollDown) { - mDesc->mScrollPos += 2; - VisBottom += 2; - VisBottom++; + if (VisBottom < (int)(mDesc->mItems.Size()-2)) + { + mDesc->mScrollPos += 2; + VisBottom += 2; + } + else + { + mDesc->mScrollPos++; + VisBottom++; + } } return true; }