mirror of
https://github.com/holub/mame
synced 2025-05-13 09:28:13 +03:00
make shift/alt+right work on channel volume sliders (fractions between 0 and 1 were always rounded down)
This commit is contained in:
parent
e8ec6dc4bf
commit
8f08a4f715
@ -1778,7 +1778,11 @@ static INT32 slider_mixervol(running_machine *machine, void *arg, astring *strin
|
||||
if (!machine->sound().indexed_speaker_input((FPTR)arg, info))
|
||||
return 0;
|
||||
if (newval != SLIDER_NOCHANGE)
|
||||
{
|
||||
INT32 curval = floor(info.stream->input_gain(info.inputnum) * 1000.0f + 0.5f);
|
||||
if (newval > curval && (newval - curval) <= 4) newval += 4; // round up on increment
|
||||
info.stream->set_input_gain(info.inputnum, (float)newval * 0.001f);
|
||||
}
|
||||
if (string != NULL)
|
||||
string->printf("%4.2f", info.stream->input_gain(info.inputnum));
|
||||
return floor(info.stream->input_gain(info.inputnum) * 1000.0f + 0.5f);
|
||||
|
Loading…
Reference in New Issue
Block a user