libretro: Fix minor compile warning.

This commit is contained in:
Stephen Anthony 2022-01-31 18:12:00 -03:30
parent 839feb7c3d
commit 625c159b81
4 changed files with 32 additions and 29 deletions

View File

@ -16,28 +16,10 @@
//============================================================================
#include "FrameLayoutDetector.hxx"
#include "TIAConstants.hxx"
/**
* Misc. numeric constants used in the algorithm.
*/
enum Metrics: uInt32 {
// ideal frame heights
frameLinesNTSC = 262,
frameLinesPAL = 312,
// number of scanlines to wait for vsync to start and stop (exceeding ideal frame height)
waitForVsync = 100,
// tolerance window around ideal frame size for TV mode detection
tvModeDetectionTolerance = 20,
// these frames will not be considered for detection
initialGarbageFrames = TIAConstants::initialGarbageFrames
};
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FrameLayout FrameLayoutDetector::detectedLayout() const{
FrameLayout FrameLayoutDetector::detectedLayout() const
{
// We choose the mode that was detected for the majority of frames.
return myPalFrames > myNtscFrames ? FrameLayout::pal : FrameLayout::ntsc;
}

View File

@ -20,12 +20,14 @@
#include "FrameLayout.hxx"
#include "AbstractFrameManager.hxx"
#include "TIAConstants.hxx"
/**
* This frame manager performs frame layout autodetection. It counts the scanlines
* in each frame and assigns guesses the frame layout from this.
*/
class FrameLayoutDetector: public AbstractFrameManager {
class FrameLayoutDetector: public AbstractFrameManager
{
public:
FrameLayoutDetector();
@ -67,6 +69,24 @@ class FrameLayoutDetector: public AbstractFrameManager {
waitForVsyncEnd
};
/**
* Misc. numeric constants used in the algorithm.
*/
enum Metrics: uInt32 {
// ideal frame heights
frameLinesNTSC = 262,
frameLinesPAL = 312,
// number of scanlines to wait for vsync to start and stop
// (exceeding ideal frame height)
waitForVsync = 100,
// tolerance window around ideal frame size for TV mode detection
tvModeDetectionTolerance = 20,
// these frames will not be considered for detection
initialGarbageFrames = TIAConstants::initialGarbageFrames
};
private:

View File

@ -17,13 +17,6 @@
#include "JitterEmulation.hxx"
enum Metrics: uInt32 {
framesForStableHeight = 2,
framesUntilDestabilization = 10,
minDeltaForJitter = 3,
maxJitter = 50
};
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
JitterEmulation::JitterEmulation()
{

View File

@ -21,7 +21,8 @@
#include "bspf.hxx"
#include "Serializable.hxx"
class JitterEmulation: public Serializable {
class JitterEmulation: public Serializable
{
public:
JitterEmulation();
@ -70,6 +71,13 @@ class JitterEmulation: public Serializable {
uInt32 myYStart{0};
enum Metrics: uInt32 {
framesForStableHeight = 2,
framesUntilDestabilization = 10,
minDeltaForJitter = 3,
maxJitter = 50
};
private:
JitterEmulation(const JitterEmulation&) = delete;