mirror of https://github.com/stella-emu/stella.git
MVC: Stay in title mode when valid file not found. (#1023)
This commit is contained in:
parent
8e8549c1c4
commit
98b2b9b1c3
|
@ -58,12 +58,15 @@ class StreamReader : public Serializable
|
|||
|
||||
bool open(string_view path) {
|
||||
myFile = Serializer(path, Serializer::Mode::ReadOnly);
|
||||
if(myFile)
|
||||
myFileSize = myFile.size();
|
||||
myFileSize = myFile ? myFile.size() : 0;
|
||||
|
||||
return static_cast<bool>(myFile);
|
||||
}
|
||||
|
||||
bool isValid() {
|
||||
return (myFileSize > 0) ? true:false;
|
||||
}
|
||||
|
||||
void blankPartialLines(bool index) {
|
||||
const int colorSize = myVisibleLines * 5;
|
||||
if (index)
|
||||
|
@ -1495,7 +1498,8 @@ bool MovieCart::process(uInt16 address)
|
|||
switch(myTitleState)
|
||||
{
|
||||
case TitleState::Display:
|
||||
myTitleCycles++;
|
||||
if (myStream.isValid())
|
||||
myTitleCycles++;
|
||||
if(myTitleCycles == TITLE_CYCLES)
|
||||
{
|
||||
stopTitleScreen();
|
||||
|
|
Loading…
Reference in New Issue