mirror of https://github.com/stella-emu/stella.git
libretro: Fix minor compile warning.
This commit is contained in:
parent
839feb7c3d
commit
625c159b81
|
@ -16,28 +16,10 @@
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "FrameLayoutDetector.hxx"
|
#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.
|
// We choose the mode that was detected for the majority of frames.
|
||||||
return myPalFrames > myNtscFrames ? FrameLayout::pal : FrameLayout::ntsc;
|
return myPalFrames > myNtscFrames ? FrameLayout::pal : FrameLayout::ntsc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,12 +20,14 @@
|
||||||
|
|
||||||
#include "FrameLayout.hxx"
|
#include "FrameLayout.hxx"
|
||||||
#include "AbstractFrameManager.hxx"
|
#include "AbstractFrameManager.hxx"
|
||||||
|
#include "TIAConstants.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This frame manager performs frame layout autodetection. It counts the scanlines
|
* This frame manager performs frame layout autodetection. It counts the scanlines
|
||||||
* in each frame and assigns guesses the frame layout from this.
|
* in each frame and assigns guesses the frame layout from this.
|
||||||
*/
|
*/
|
||||||
class FrameLayoutDetector: public AbstractFrameManager {
|
class FrameLayoutDetector: public AbstractFrameManager
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
FrameLayoutDetector();
|
FrameLayoutDetector();
|
||||||
|
@ -67,6 +69,24 @@ class FrameLayoutDetector: public AbstractFrameManager {
|
||||||
waitForVsyncEnd
|
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:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -17,13 +17,6 @@
|
||||||
|
|
||||||
#include "JitterEmulation.hxx"
|
#include "JitterEmulation.hxx"
|
||||||
|
|
||||||
enum Metrics: uInt32 {
|
|
||||||
framesForStableHeight = 2,
|
|
||||||
framesUntilDestabilization = 10,
|
|
||||||
minDeltaForJitter = 3,
|
|
||||||
maxJitter = 50
|
|
||||||
};
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
JitterEmulation::JitterEmulation()
|
JitterEmulation::JitterEmulation()
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
#include "Serializable.hxx"
|
#include "Serializable.hxx"
|
||||||
|
|
||||||
class JitterEmulation: public Serializable {
|
class JitterEmulation: public Serializable
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
JitterEmulation();
|
JitterEmulation();
|
||||||
|
@ -70,6 +71,13 @@ class JitterEmulation: public Serializable {
|
||||||
|
|
||||||
uInt32 myYStart{0};
|
uInt32 myYStart{0};
|
||||||
|
|
||||||
|
enum Metrics: uInt32 {
|
||||||
|
framesForStableHeight = 2,
|
||||||
|
framesUntilDestabilization = 10,
|
||||||
|
minDeltaForJitter = 3,
|
||||||
|
maxJitter = 50
|
||||||
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
JitterEmulation(const JitterEmulation&) = delete;
|
JitterEmulation(const JitterEmulation&) = delete;
|
||||||
|
|
Loading…
Reference in New Issue