libsaria: Improve random_next()
Limiting rand to plist.size() * (3 / 4) kept causing songs at the end of the range to get selected. This caused a backwards-scrolling effect as songs were played. Instead, I want to pick from the next half of the list to create a forward-scrolling effect. Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
parent
570374f53d
commit
45c839c04a
|
@ -62,7 +62,7 @@ namespace libsaria
|
|||
return picked_next();
|
||||
}
|
||||
|
||||
n = rand() % ((size * 3) / 4);
|
||||
n = rand() % (size / 2);
|
||||
for (unsigned int i = 0; i < n; i++)
|
||||
incr_iter();
|
||||
|
||||
|
|
Loading…
Reference in New Issue