Fixed bug with previous disk button now working as expected when you have a large amount of disks in the set.

This commit is contained in:
Stephen White 2018-06-14 20:39:07 +10:00
parent 8a25afaeb0
commit 63ee223088

View file

@ -55,7 +55,9 @@ public:
DiskImage* PrevDisk() DiskImage* PrevDisk()
{ {
selectedIndex = (selectedIndex - 1) % (u32)disks.size(); --selectedIndex;
if ((int)selectedIndex < 0)
selectedIndex += (u32)disks.size();
return GetCurrentDisk(); return GetCurrentDisk();
} }