mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Menus: Fix RangeInt32.
git-svn-id: https://svn.eduke32.com/eduke32@6412 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
a1d17f3a49
commit
c3fcd92db3
1 changed files with 3 additions and 3 deletions
|
@ -5374,7 +5374,7 @@ static void Menu_RunInput_EntryRangeInt32_MovementArbitrary(MenuEntry_t *entry,
|
|||
int32_t const range = object->max - object->min;
|
||||
int32_t const maxInterval = object->steps - 1;
|
||||
int32_t const newValueIndex = roundscale(newValue - object->min, maxInterval, range);
|
||||
newValue = roundscale(newValueIndex, range, maxInterval) + object->min;
|
||||
newValue = newValueIndex * range / maxInterval + object->min;
|
||||
}
|
||||
|
||||
Menu_RunInput_EntryRangeInt32_MovementVerify(entry, object, newValue);
|
||||
|
@ -5386,7 +5386,7 @@ static void Menu_RunInput_EntryRangeInt32_Movement(MenuEntry_t *entry, MenuRange
|
|||
int32_t const range = object->max - object->min;
|
||||
int32_t const maxInterval = object->steps - 1;
|
||||
int32_t newValueIndex = roundscale(oldValue - object->min, maxInterval, range);
|
||||
int32_t const newValueProjected = roundscale(newValueIndex, range, maxInterval) + object->min;
|
||||
int32_t const newValueProjected = newValueIndex * range / maxInterval + object->min;
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
|
@ -5414,7 +5414,7 @@ static void Menu_RunInput_EntryRangeInt32_Movement(MenuEntry_t *entry, MenuRange
|
|||
break;
|
||||
}
|
||||
|
||||
int32_t const newValue = roundscale(newValueIndex, range, maxInterval) + object->min;
|
||||
int32_t const newValue = newValueIndex * range / maxInterval + object->min;
|
||||
Menu_RunInput_EntryRangeInt32_MovementVerify(entry, object, newValue);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue