NSF player: limit track number to legal range and print current track number to console
This commit is contained in:
parent
2765961984
commit
3844bf3c12
|
@ -125,12 +125,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
||||||
Buffer.BlockCopy(nsf.NSFData, 0x80, FakePRG, load_start, load_size);
|
Buffer.BlockCopy(nsf.NSFData, 0x80, FakePRG, load_start, load_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReplayInit();
|
|
||||||
CurrentSong = nsf.StartingSong;
|
CurrentSong = nsf.StartingSong;
|
||||||
|
ReplayInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReplayInit()
|
void ReplayInit()
|
||||||
{
|
{
|
||||||
|
Console.WriteLine("NSF: Playing track {0}/{1}", CurrentSong, nsf.TotalSongs-1);
|
||||||
InitPending = true;
|
InitPending = true;
|
||||||
Patch_Vectors = true;
|
Patch_Vectors = true;
|
||||||
}
|
}
|
||||||
|
@ -330,13 +331,19 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
||||||
bool reset = false;
|
bool reset = false;
|
||||||
if (right)
|
if (right)
|
||||||
{
|
{
|
||||||
CurrentSong++;
|
if (CurrentSong < nsf.TotalSongs - 1)
|
||||||
reset = true;
|
{
|
||||||
|
CurrentSong++;
|
||||||
|
reset = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (left)
|
if (left)
|
||||||
{
|
{
|
||||||
CurrentSong--;
|
if (CurrentSong > 0)
|
||||||
reset = true;
|
{
|
||||||
|
CurrentSong--;
|
||||||
|
reset = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (a)
|
if (a)
|
||||||
|
|
Loading…
Reference in New Issue