mirror of https://github.com/stella-emu/stella.git
Display Hz in console time.
This commit is contained in:
parent
81f216872d
commit
6da398deaa
|
@ -978,7 +978,7 @@ void Console::generateColorLossPalette()
|
||||||
float Console::getFramerate() const
|
float Console::getFramerate() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
static_cast<float>(myEmulationTiming.linesPerSecond()) / myTIA->frameBufferScanlinesLastFrame();
|
(myConsoleTiming == ConsoleTiming::ntsc ? 262. * 60. : 312. * 50.) / myTIA->frameBufferScanlinesLastFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -134,12 +134,6 @@ uInt32 EmulationTiming::cyclesPerSecond() const
|
||||||
return myCyclesPerSecond;
|
return myCyclesPerSecond;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
uInt32 EmulationTiming::linesPerSecond() const
|
|
||||||
{
|
|
||||||
return myLinesPerSecond;
|
|
||||||
}
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
uInt32 EmulationTiming::audioFragmentSize() const
|
uInt32 EmulationTiming::audioFragmentSize() const
|
||||||
{
|
{
|
||||||
|
@ -210,6 +204,4 @@ void EmulationTiming::recalculate()
|
||||||
myPrebufferFragmentCount,
|
myPrebufferFragmentCount,
|
||||||
discreteDivCeil(myMaxCyclesPerTimeslice * myAudioSampleRate, myAudioFragmentSize * myCyclesPerSecond)
|
discreteDivCeil(myMaxCyclesPerTimeslice * myAudioSampleRate, myAudioFragmentSize * myCyclesPerSecond)
|
||||||
) + myAudioQueueExtraFragments;
|
) + myAudioQueueExtraFragments;
|
||||||
|
|
||||||
myLinesPerSecond = myCyclesPerSecond / 76;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,8 +49,6 @@ class EmulationTiming {
|
||||||
|
|
||||||
uInt32 cyclesPerFrame() const;
|
uInt32 cyclesPerFrame() const;
|
||||||
|
|
||||||
uInt32 linesPerSecond() const;
|
|
||||||
|
|
||||||
uInt32 cyclesPerSecond() const;
|
uInt32 cyclesPerSecond() const;
|
||||||
|
|
||||||
uInt32 audioFragmentSize() const;
|
uInt32 audioFragmentSize() const;
|
||||||
|
|
Loading…
Reference in New Issue