mirror of https://github.com/stella-emu/stella.git
Move codebase to requiring C++20, and fix resultant non-standard code.
This commit is contained in:
parent
4aba8a1955
commit
ce6cc2ef02
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
* Added Joy2B+ controller support.
|
* Added Joy2B+ controller support.
|
||||||
|
|
||||||
* Added auto detection for QuadTari attached controllers
|
* Added auto detection for QuadTari attached controllers.
|
||||||
|
|
||||||
* Enhanced Kid Vid support to play tape audio.
|
* Enhanced Kid Vid support to play tape audio.
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
* Added missing PlusROM support for E7 bankswitching.
|
* Added missing PlusROM support for E7 bankswitching.
|
||||||
|
|
||||||
* Enhanced movie cart (MVC) support
|
* Enhanced movie cart (MVC) support.
|
||||||
|
|
||||||
* Accelerated emulation up to ~15% (ARM).
|
* Accelerated emulation up to ~15% (ARM).
|
||||||
|
|
||||||
|
@ -60,6 +60,9 @@
|
||||||
|
|
||||||
* Removed 'launcherroms' option, since it was causing some issues.
|
* Removed 'launcherroms' option, since it was causing some issues.
|
||||||
|
|
||||||
|
* Codebase now uses C++20 features, which means a minimum of gcc-11
|
||||||
|
or clang-10 for Linux/Mac, and Visual Studio 2022 for Windows.
|
||||||
|
|
||||||
-Have fun!
|
-Have fun!
|
||||||
|
|
||||||
|
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -51,12 +51,12 @@ CXXFLAGS+= -Wall -Wextra -Wno-unused-parameter
|
||||||
CFLAGS+= -Wall -Wextra -Wno-unused-parameter
|
CFLAGS+= -Wall -Wextra -Wno-unused-parameter
|
||||||
|
|
||||||
ifdef HAVE_GCC
|
ifdef HAVE_GCC
|
||||||
CXXFLAGS+= -Wno-multichar -Wunused -Woverloaded-virtual -Wnon-virtual-dtor -std=c++17
|
CXXFLAGS+= -Wno-multichar -Wunused -Woverloaded-virtual -Wnon-virtual-dtor -std=c++20
|
||||||
CFLAGS+= -Wno-multichar -Wunused
|
CFLAGS+= -Wno-multichar -Wunused
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef HAVE_CLANG
|
ifdef HAVE_CLANG
|
||||||
CXXFLAGS+= -Wno-multichar -Wunused -Woverloaded-virtual -Wnon-virtual-dtor -std=c++17
|
CXXFLAGS+= -Wno-multichar -Wunused -Woverloaded-virtual -Wnon-virtual-dtor -std=c++20
|
||||||
CFLAGS+= -Wno-multichar -Wunused
|
CFLAGS+= -Wno-multichar -Wunused
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -378,7 +378,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for compiler in $compilers; do
|
for compiler in $compilers; do
|
||||||
if test_compiler "$compiler -std=c++17"; then
|
if test_compiler "$compiler -std=c++20"; then
|
||||||
CXX=$compiler
|
CXX=$compiler
|
||||||
echo $CXX
|
echo $CXX
|
||||||
break
|
break
|
||||||
|
|
|
@ -265,7 +265,7 @@
|
||||||
<h2><b><a name="Features">Features</a></b></h2>
|
<h2><b><a name="Features">Features</a></b></h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>High speed emulation using optimized C++17 code</li>
|
<li>High speed emulation using optimized C++20 code</li>
|
||||||
<li>Supports high quality TIA emulation using the cycle-exact TIA core from
|
<li>Supports high quality TIA emulation using the cycle-exact TIA core from
|
||||||
<a href="https://github.com/6502ts/6502.ts">6502.ts</a> by
|
<a href="https://github.com/6502ts/6502.ts">6502.ts</a> by
|
||||||
Christian Speckner</li>
|
Christian Speckner</li>
|
||||||
|
@ -359,7 +359,7 @@
|
||||||
<li>i386 or x86_64 class machine, with 32 or 64-bit distribution</li>
|
<li>i386 or x86_64 class machine, with 32 or 64-bit distribution</li>
|
||||||
<li>Other architectures (MIPS, PPC, PPC64, etc.) have been confirmed to work,
|
<li>Other architectures (MIPS, PPC, PPC64, etc.) have been confirmed to work,
|
||||||
but aren't as well tested as i386/x86_64</li>
|
but aren't as well tested as i386/x86_64</li>
|
||||||
<li>GNU g++ v/7 or Clang v/5 (with C++17 support) and the make utility are required for compiling the Stella source code</li>
|
<li>GNU g++ v/11 or Clang v/10 (with C++20 support) and the make utility are required for compiling the Stella source code</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -62,8 +62,9 @@ class FSNodeFactory
|
||||||
return make_unique<FSNodeZIP>(path);
|
return make_unique<FSNodeZIP>(path);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
return nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -218,6 +218,7 @@ size_t FSNodeZIP::read(ByteBuffer& buffer, size_t) const
|
||||||
case zip_error::NOT_A_FILE: throw runtime_error("ZIP file contains errors/not found");
|
case zip_error::NOT_A_FILE: throw runtime_error("ZIP file contains errors/not found");
|
||||||
case zip_error::NOT_READABLE: throw runtime_error("ZIP file not readable");
|
case zip_error::NOT_READABLE: throw runtime_error("ZIP file not readable");
|
||||||
case zip_error::NO_ROMS: throw runtime_error("ZIP file doesn't contain any ROMs");
|
case zip_error::NO_ROMS: throw runtime_error("ZIP file doesn't contain any ROMs");
|
||||||
|
default: throw runtime_error("FSNodeZIP::read default case hit");
|
||||||
}
|
}
|
||||||
|
|
||||||
myZipHandler->open(_zipFile);
|
myZipHandler->open(_zipFile);
|
||||||
|
|
|
@ -46,32 +46,27 @@ void FpsMeter::render(uInt32 frameCount)
|
||||||
}
|
}
|
||||||
|
|
||||||
const size_t queueSize = myQueue.capacity();
|
const size_t queueSize = myQueue.capacity();
|
||||||
entry first, last;
|
entry e_first, e_last;
|
||||||
|
|
||||||
last.frames = frameCount;
|
e_last.frames = frameCount;
|
||||||
last.timestamp = high_resolution_clock::now();
|
e_last.timestamp = high_resolution_clock::now();
|
||||||
|
|
||||||
if (myQueue.size() < queueSize) {
|
if (myQueue.size() < queueSize) {
|
||||||
myQueue.push_back(last);
|
myQueue.push_back(e_last);
|
||||||
myFrameCount += frameCount;
|
myFrameCount += frameCount;
|
||||||
|
|
||||||
first = myQueue.at(myQueueOffset);
|
e_first = myQueue.at(myQueueOffset);
|
||||||
} else {
|
} else {
|
||||||
myFrameCount = myFrameCount - myQueue.at(myQueueOffset).frames + frameCount;
|
myFrameCount = myFrameCount - myQueue.at(myQueueOffset).frames + frameCount;
|
||||||
myQueue.at(myQueueOffset) = last;
|
myQueue.at(myQueueOffset) = e_last;
|
||||||
|
|
||||||
myQueueOffset = (myQueueOffset + 1) % queueSize;
|
myQueueOffset = (myQueueOffset + 1) % queueSize;
|
||||||
first = myQueue.at(myQueueOffset);
|
e_first = myQueue.at(myQueueOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
const float myTimeInterval =
|
const float myTimeInterval =
|
||||||
duration_cast<duration<float>>(last.timestamp - first.timestamp).count();
|
duration_cast<duration<float>>(e_last.timestamp - e_first.timestamp).count();
|
||||||
|
|
||||||
if (myTimeInterval > 0) myFps = (myFrameCount - first.frames) / myTimeInterval;
|
if (myTimeInterval > 0)
|
||||||
}
|
myFps = (myFrameCount - e_first.frames) / myTimeInterval;
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
float FpsMeter::fps() const
|
|
||||||
{
|
|
||||||
return myFps;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ class FpsMeter
|
||||||
|
|
||||||
void render(uInt32 frameCount);
|
void render(uInt32 frameCount);
|
||||||
|
|
||||||
float fps() const;
|
float fps() const { return myFps; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ class LinkedObjectPool
|
||||||
/*
|
/*
|
||||||
Create a pool of size CAPACITY; the active list starts out empty.
|
Create a pool of size CAPACITY; the active list starts out empty.
|
||||||
*/
|
*/
|
||||||
LinkedObjectPool<T, CAPACITY>() { resize(CAPACITY); }
|
LinkedObjectPool() { resize(CAPACITY); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Return node data that the 'current' iterator points to.
|
Return node data that the 'current' iterator points to.
|
||||||
|
|
|
@ -96,6 +96,8 @@ MouseControl::MouseControl(Console& console, string_view mode)
|
||||||
id = 1;
|
id = 1;
|
||||||
msg << "Right MindLink";
|
msg << "Right MindLink";
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break; // Not supposed to get here
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#pragma clang diagnostic ignored "-Wimplicit-fallthrough"
|
#pragma clang diagnostic ignored "-Wimplicit-fallthrough"
|
||||||
#pragma clang diagnostic ignored "-Wreserved-id-macro"
|
#pragma clang diagnostic ignored "-Wreserved-id-macro"
|
||||||
#pragma clang diagnostic ignored "-Wold-style-cast"
|
#pragma clang diagnostic ignored "-Wold-style-cast"
|
||||||
|
#pragma clang diagnostic ignored "-Wswitch-default"
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
#elif defined(BSPF_WINDOWS)
|
#elif defined(BSPF_WINDOWS)
|
||||||
|
|
|
@ -283,6 +283,8 @@ string SoundSDL2::about() const
|
||||||
case AudioSettings::Preset::ultraQualityMinimalLag:
|
case AudioSettings::Preset::ultraQualityMinimalLag:
|
||||||
buf << "Ultra quality, minimal lag\n";
|
buf << "Ultra quality, minimal lag\n";
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break; // Not supposed to get here
|
||||||
}
|
}
|
||||||
buf << " Fragment size: " << static_cast<uInt32>(myHardwareSpec.samples)
|
buf << " Fragment size: " << static_cast<uInt32>(myHardwareSpec.samples)
|
||||||
<< " bytes\n"
|
<< " bytes\n"
|
||||||
|
@ -300,6 +302,8 @@ string SoundSDL2::about() const
|
||||||
case AudioSettings::ResamplingQuality::lanczos_3:
|
case AudioSettings::ResamplingQuality::lanczos_3:
|
||||||
buf << "Quality 3, Lanczos (a = 3)\n";
|
buf << "Quality 3, Lanczos (a = 3)\n";
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break; // Not supposed to get here
|
||||||
}
|
}
|
||||||
buf << " Headroom: " << std::fixed << std::setprecision(1)
|
buf << " Headroom: " << std::fixed << std::setprecision(1)
|
||||||
<< (0.5 * myAudioSettings.headroom()) << " frames\n"
|
<< (0.5 * myAudioSettings.headroom()) << " frames\n"
|
||||||
|
|
|
@ -37,7 +37,7 @@ class FixedStack
|
||||||
public:
|
public:
|
||||||
using StackFunction = std::function<void(T&)>;
|
using StackFunction = std::function<void(T&)>;
|
||||||
|
|
||||||
FixedStack<T, CAPACITY>() = default;
|
FixedStack() = default;
|
||||||
|
|
||||||
bool empty() const { return _size == 0; }
|
bool empty() const { return _size == 0; }
|
||||||
bool full() const { return _size >= CAPACITY; }
|
bool full() const { return _size >= CAPACITY; }
|
||||||
|
|
|
@ -139,6 +139,8 @@ VideoModeHandler::Mode::Mode(uInt32 iw, uInt32 ih, uInt32 sw, uInt32 sh,
|
||||||
iw = std::min(static_cast<uInt32>(iw * zoomLevel), screenS.w) * overscan;
|
iw = std::min(static_cast<uInt32>(iw * zoomLevel), screenS.w) * overscan;
|
||||||
ih = std::min(static_cast<uInt32>(ih * zoomLevel), screenS.h) * overscan;
|
ih = std::min(static_cast<uInt32>(ih * zoomLevel), screenS.h) * overscan;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break; // Not supposed to get here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -157,6 +159,9 @@ VideoModeHandler::Mode::Mode(uInt32 iw, uInt32 ih, uInt32 sw, uInt32 sh,
|
||||||
|
|
||||||
case Stretch::None: // UI Mode
|
case Stretch::None: // UI Mode
|
||||||
break; // Do not change image or screen rects whatsoever
|
break; // Do not change image or screen rects whatsoever
|
||||||
|
|
||||||
|
default:
|
||||||
|
break; // Not supposed to get here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ void AtariNTSC::render(const uInt8* atari_in, const uInt32 in_width,
|
||||||
// Spawn the threads...
|
// Spawn the threads...
|
||||||
for(uInt32 i = 0; i < myWorkerThreads; ++i)
|
for(uInt32 i = 0; i < myWorkerThreads; ++i)
|
||||||
{
|
{
|
||||||
myThreads[i] = std::thread([=] // NOLINT (cppcoreguidelines-misleading-capture-default-by-value
|
myThreads[i] = std::thread([=, this]
|
||||||
{
|
{
|
||||||
rgb_in == nullptr ?
|
rgb_in == nullptr ?
|
||||||
renderThread(atari_in, in_width, in_height, myTotalThreads,
|
renderThread(atari_in, in_width, in_height, myTotalThreads,
|
||||||
|
|
|
@ -741,6 +741,9 @@ bool CartDebug::getLabel(ostream& buf, uInt16 addr, bool isRead,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
break; // Not supposed to get here
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(places)
|
switch(places)
|
||||||
|
|
|
@ -383,6 +383,8 @@ bool DebuggerParser::getArgs(string_view command, string& verb)
|
||||||
curArg += c;
|
curArg += c;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break; // Not supposed to get here
|
||||||
} // switch(state)
|
} // switch(state)
|
||||||
}
|
}
|
||||||
while(i < length);
|
while(i < length);
|
||||||
|
@ -505,6 +507,9 @@ bool DebuggerParser::validateArgs(int cmd)
|
||||||
|
|
||||||
case Parameters::ARG_END_ARGS:
|
case Parameters::ARG_END_ARGS:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break; // Not supposed to get here
|
||||||
}
|
}
|
||||||
++curCount;
|
++curCount;
|
||||||
++p;
|
++p;
|
||||||
|
@ -2645,6 +2650,8 @@ void DebuggerParser::executeTrapRW(uInt32 addr, bool read, bool write, bool add)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break; // Not supposed to get here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -505,8 +505,10 @@ bool TIADebug::collision(CollisionBit id, bool toggle) const
|
||||||
if(toggle)
|
if(toggle)
|
||||||
myTIA.toggleCollM0M1();
|
myTIA.toggleCollM0M1();
|
||||||
return myTIA.collCXPPMM() & 0x40;
|
return myTIA.collCXPPMM() & 0x40;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false; // Not supposed to get here
|
||||||
}
|
}
|
||||||
return false; // make compiler happy
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -399,6 +399,9 @@ int yylex() {
|
||||||
return yylval.val;
|
return yylval.val;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break; // Not supposed to get here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1516,6 +1516,9 @@ bool MovieCart::process(uInt16 address)
|
||||||
case TitleState::Stream:
|
case TitleState::Stream:
|
||||||
runStateMachine();
|
runStateMachine();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break; // Not supposed to get here
|
||||||
}
|
}
|
||||||
|
|
||||||
return a12;
|
return a12;
|
||||||
|
|
|
@ -293,6 +293,9 @@ void FBSurface::frameRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h,
|
||||||
vLine(x + w - 1, i, i, color);
|
vLine(x + w - 1, i, i, color);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break; // Not supposed to get here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ class FSNode
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Append the given path to the node, adding a directory separator
|
* Append the given path to the node, adding a directory separator
|
||||||
* when necessary. Modelled on the C++17 fs::path API.
|
* when necessary.
|
||||||
*/
|
*/
|
||||||
FSNode& operator/=(string_view path);
|
FSNode& operator/=(string_view path);
|
||||||
|
|
||||||
|
|
|
@ -890,6 +890,9 @@ inline bool FrameBuffer::drawMessage()
|
||||||
myMsg.x = imageRect().w() - dst.w() - 5;
|
myMsg.x = imageRect().w() - dst.w() - 5;
|
||||||
myMsg.y = imageRect().h() - dst.h() - 5;
|
myMsg.y = imageRect().h() - dst.h() - 5;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break; // Not supposed to get here
|
||||||
}
|
}
|
||||||
|
|
||||||
myMsg.surface->setDstPos(myMsg.x + imageRect().x(), myMsg.y + imageRect().y());
|
myMsg.surface->setDstPos(myMsg.x + imageRect().x(), myMsg.y + imageRect().y());
|
||||||
|
|
|
@ -433,7 +433,7 @@ void PlusROM::send()
|
||||||
// as the thread is running. Thus, the request can only be destructed once
|
// as the thread is running. Thus, the request can only be destructed once
|
||||||
// the thread has finished, and we can safely evict it from the deque at
|
// the thread has finished, and we can safely evict it from the deque at
|
||||||
// any time.
|
// any time.
|
||||||
std::thread thread([=]() // NOLINT (cppcoreguidelines-misleading-capture-default-by-value)
|
std::thread thread([=, this]()
|
||||||
{
|
{
|
||||||
request->execute();
|
request->execute();
|
||||||
switch(request->getState())
|
switch(request->getState())
|
||||||
|
|
|
@ -482,6 +482,8 @@ string TIASurface::effectsInfo() const
|
||||||
case Filter::BlarggPhosphor:
|
case Filter::BlarggPhosphor:
|
||||||
buf << myNTSCFilter.getPreset() << ", phosphor=" << myPBlend;
|
buf << myNTSCFilter.getPreset() << ", phosphor=" << myPBlend;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break; // Not supposed to get here
|
||||||
}
|
}
|
||||||
if(attr.blendalpha)
|
if(attr.blendalpha)
|
||||||
buf << ", scanlines=" << attr.blendalpha
|
buf << ", scanlines=" << attr.blendalpha
|
||||||
|
@ -585,6 +587,9 @@ void TIASurface::render(bool shade)
|
||||||
myNTSCFilter.render(myTIA->frameBuffer(), width, height, out, outPitch << 2, myRGBFramebuffer.data());
|
myNTSCFilter.render(myTIA->frameBuffer(), width, height, out, outPitch << 2, myRGBFramebuffer.data());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
break; // Not supposed to get here
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw TIA image
|
// Draw TIA image
|
||||||
|
@ -624,7 +629,7 @@ void TIASurface::renderForSnapshot()
|
||||||
myTiaSurface->basePtr(outPtr, outPitch);
|
myTiaSurface->basePtr(outPtr, outPitch);
|
||||||
|
|
||||||
mySaveSnapFlag = false;
|
mySaveSnapFlag = false;
|
||||||
switch (myFilter)
|
switch(myFilter)
|
||||||
{
|
{
|
||||||
// For non-phosphor modes, render the frame again
|
// For non-phosphor modes, render the frame again
|
||||||
case Filter::Normal:
|
case Filter::Normal:
|
||||||
|
@ -650,11 +655,16 @@ void TIASurface::renderForSnapshot()
|
||||||
}
|
}
|
||||||
|
|
||||||
case Filter::BlarggPhosphor:
|
case Filter::BlarggPhosphor:
|
||||||
|
{
|
||||||
uInt32 bufofs = 0;
|
uInt32 bufofs = 0;
|
||||||
for(uInt32 y = height; y; --y)
|
for(uInt32 y = height; y; --y)
|
||||||
for(uInt32 x = outPitch; x; --x)
|
for(uInt32 x = outPitch; x; --x)
|
||||||
outPtr[pos++] = averageBuffers(bufofs++);
|
outPtr[pos++] = averageBuffers(bufofs++);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
break; // Not supposed to get here
|
||||||
}
|
}
|
||||||
|
|
||||||
if(myPhosphorHandler.phosphorEnabled())
|
if(myPhosphorHandler.phosphorEnabled())
|
||||||
|
|
|
@ -224,6 +224,9 @@ void Playfield::applyColors()
|
||||||
myColorRight = myColorP1 &= 0xfe;
|
myColorRight = myColorP1 &= 0xfe;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break; // Not supposed to get here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -436,6 +436,9 @@ void TIA::bindToControllers()
|
||||||
case Controller::AnalogPin::Nine:
|
case Controller::AnalogPin::Nine:
|
||||||
updateAnalogReadout(0);
|
updateAnalogReadout(0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break; // Not supposed to get here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -452,6 +455,9 @@ void TIA::bindToControllers()
|
||||||
case Controller::AnalogPin::Nine:
|
case Controller::AnalogPin::Nine:
|
||||||
updateAnalogReadout(2);
|
updateAnalogReadout(2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break; // Not supposed to get here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -1797,6 +1803,9 @@ FORCE_INLINE void TIA::renderPixel(uInt32 x, uInt32 y)
|
||||||
else if (myBall.isOn()) color = myBall.getColor();
|
else if (myBall.isOn()) color = myBall.getColor();
|
||||||
else color = myBackground.getColor();
|
else color = myBackground.getColor();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break; // Not supposed to get here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -239,7 +239,7 @@ void FrameLayoutDetector::finalizeFrame()
|
||||||
// 1.0 (>=312) and added to PAL and (inverted) NTSC sums.
|
// 1.0 (>=312) and added to PAL and (inverted) NTSC sums.
|
||||||
constexpr double ODD_PENALTY = 0.5; // guessed value :)
|
constexpr double ODD_PENALTY = 0.5; // guessed value :)
|
||||||
const double palFrame = BSPF::clamp(((myCurrentFrameFinalLines % 2) ? ODD_PENALTY : 1.0)
|
const double palFrame = BSPF::clamp(((myCurrentFrameFinalLines % 2) ? ODD_PENALTY : 1.0)
|
||||||
* (static_cast<double>(myCurrentFrameFinalLines) - frameLinesNTSC)
|
* static_cast<double>(myCurrentFrameFinalLines - frameLinesNTSC)
|
||||||
/ static_cast<double>(frameLinesPAL - frameLinesNTSC), 0.0, 1.0);
|
/ static_cast<double>(frameLinesPAL - frameLinesNTSC), 0.0, 1.0);
|
||||||
myPalFrameSum += palFrame;
|
myPalFrameSum += palFrame;
|
||||||
myNtscFrameSum += 1.0 - palFrame;
|
myNtscFrameSum += 1.0 - palFrame;
|
||||||
|
|
|
@ -265,6 +265,9 @@ void BrowserDialog::show(string_view startpath,
|
||||||
_selected->setEnabled(false);
|
_selected->setEnabled(false);
|
||||||
_okWidget->setLabel("OK");
|
_okWidget->setLabel("OK");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break; // Not supposed to get here
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set start path
|
// Set start path
|
||||||
|
|
|
@ -320,6 +320,7 @@ void DialogContainer::handleMouseButtonEvent(MouseButton b, bool pressed,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MouseButton::NONE: // should never get here
|
case MouseButton::NONE: // should never get here
|
||||||
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -968,6 +968,8 @@ void CheckboxWidget::setFill(FillType type)
|
||||||
_img = checked_img_circle.data();
|
_img = checked_img_circle.data();
|
||||||
_drawBox = false;
|
_drawBox = false;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break; // Not supposed to get here
|
||||||
}
|
}
|
||||||
setDirty();
|
setDirty();
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ TARGET_NAME = stella
|
||||||
|
|
||||||
|
|
||||||
ifeq (,$(findstring msvc,$(platform)))
|
ifeq (,$(findstring msvc,$(platform)))
|
||||||
CXXFLAGS += -std=c++17 -fno-rtti
|
CXXFLAGS += -std=c++20 -fno-rtti
|
||||||
LIBS := -lm
|
LIBS := -lm
|
||||||
else
|
else
|
||||||
LIBS :=
|
LIBS :=
|
||||||
|
@ -305,8 +305,8 @@ else ifneq (,$(filter $(platform), ngc wii wiiu))
|
||||||
else ifeq ($(platform), emscripten)
|
else ifeq ($(platform), emscripten)
|
||||||
TARGET := $(TARGET_NAME)_libretro_$(platform).bc
|
TARGET := $(TARGET_NAME)_libretro_$(platform).bc
|
||||||
STATIC_LINKING = 1
|
STATIC_LINKING = 1
|
||||||
CXXFLAGS += $(PTHREAD_FLAGS) -std=c++17
|
CXXFLAGS += $(PTHREAD_FLAGS) -std=c++20
|
||||||
LDFLAGS += $(PTHREAD_FLAGS) -std=c++17
|
LDFLAGS += $(PTHREAD_FLAGS) -std=c++20
|
||||||
|
|
||||||
# Genode
|
# Genode
|
||||||
else ifeq ($(platform), genode)
|
else ifeq ($(platform), genode)
|
||||||
|
@ -370,7 +370,7 @@ else ifneq (,$(findstring windows_msvc2017,$(platform)))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Specific to this core
|
# Specific to this core
|
||||||
MSVC2017CompileFlags += -D__WIN32__ /std:c++17
|
MSVC2017CompileFlags += -D__WIN32__ /std:c++20
|
||||||
|
|
||||||
CXX = cl.exe
|
CXX = cl.exe
|
||||||
CXXFLAGS += $(MSVC2017CompileFlags)
|
CXXFLAGS += $(MSVC2017CompileFlags)
|
||||||
|
|
|
@ -14,6 +14,6 @@ endif
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
LOCAL_MODULE := retro
|
LOCAL_MODULE := retro
|
||||||
LOCAL_SRC_FILES := $(SOURCES_CXX) $(SOURCES_C)
|
LOCAL_SRC_FILES := $(SOURCES_CXX) $(SOURCES_C)
|
||||||
LOCAL_CXXFLAGS := $(COREFLAGS) -std=c++17
|
LOCAL_CXXFLAGS := $(COREFLAGS) -std=c++20
|
||||||
LOCAL_LDFLAGS := -Wl,-version-script=$(CORE_DIR)/os/libretro/link.T
|
LOCAL_LDFLAGS := -Wl,-version-script=$(CORE_DIR)/os/libretro/link.T
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
include $(BUILD_SHARED_LIBRARY)
|
||||||
|
|
|
@ -3791,7 +3791,7 @@
|
||||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||||
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES;
|
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES;
|
||||||
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES;
|
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
|
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_WARN_ASSIGN_ENUM = YES;
|
CLANG_WARN_ASSIGN_ENUM = YES;
|
||||||
CLANG_WARN_ATOMIC_IMPLICIT_SEQ_CST = YES;
|
CLANG_WARN_ATOMIC_IMPLICIT_SEQ_CST = YES;
|
||||||
|
@ -3869,7 +3869,7 @@
|
||||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||||
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES;
|
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES;
|
||||||
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES;
|
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
|
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_WARN_ASSIGN_ENUM = YES;
|
CLANG_WARN_ASSIGN_ENUM = YES;
|
||||||
CLANG_WARN_ATOMIC_IMPLICIT_SEQ_CST = YES;
|
CLANG_WARN_ATOMIC_IMPLICIT_SEQ_CST = YES;
|
||||||
|
|
|
@ -593,7 +593,7 @@
|
||||||
<WarningLevel>Level4</WarningLevel>
|
<WarningLevel>Level4</WarningLevel>
|
||||||
<DebugInformationFormat>None</DebugInformationFormat>
|
<DebugInformationFormat>None</DebugInformationFormat>
|
||||||
<ObjectFileName>$(IntDir)obj\\windows\%(RelativeDir)</ObjectFileName>
|
<ObjectFileName>$(IntDir)obj\\windows\%(RelativeDir)</ObjectFileName>
|
||||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<DisableSpecificWarnings>4100;4127;4146;4244;26400;26409;26410;26415;26429;26438;26440;26446;26451;26455;26459;26467;26472;26481;26482;26485;26492;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
<DisableSpecificWarnings>4100;4127;4146;4244;26400;26409;26410;26415;26429;26438;26440;26446;26451;26455;26459;26467;26472;26481;26482;26485;26492;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
<CompileAs>CompileAsCpp</CompileAs>
|
<CompileAs>CompileAsCpp</CompileAs>
|
||||||
|
|
Loading…
Reference in New Issue