mirror of https://github.com/stella-emu/stella.git
Fix some warnings generated by cppcheck (a C++ linter).
This commit is contained in:
parent
409fa49aae
commit
8c7488914d
|
@ -27,7 +27,8 @@ AudioQueue::AudioQueue(uInt32 fragmentSize, uInt32 capacity, bool isStereo)
|
||||||
myFragmentQueue(capacity),
|
myFragmentQueue(capacity),
|
||||||
myAllFragments(capacity + 2),
|
myAllFragments(capacity + 2),
|
||||||
mySize(0),
|
mySize(0),
|
||||||
myNextFragment(0)
|
myNextFragment(0),
|
||||||
|
myIgnoreOverflows(true)
|
||||||
{
|
{
|
||||||
const uInt8 sampleSize = myIsStereo ? 2 : 1;
|
const uInt8 sampleSize = myIsStereo ? 2 : 1;
|
||||||
|
|
||||||
|
|
|
@ -185,7 +185,11 @@ class AtariNTSC
|
||||||
float fringing;
|
float fringing;
|
||||||
float kernel [rescale_out * kernel_size * 2];
|
float kernel [rescale_out * kernel_size * 2];
|
||||||
|
|
||||||
init_t() : contrast(0.0), brightness(0.0), artifacts(0.0), fringing(0.0) { }
|
init_t() : contrast(0.0), brightness(0.0), artifacts(0.0), fringing(0.0) {
|
||||||
|
std::fill(to_rgb, to_rgb + burst_count * 6, 0.0);
|
||||||
|
std::fill(to_float, to_float + gamma_size, 0.0);
|
||||||
|
std::fill(kernel, kernel + rescale_out * kernel_size * 2, 0.0);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
init_t myImpl;
|
init_t myImpl;
|
||||||
|
|
||||||
|
|
|
@ -460,7 +460,7 @@ bool CartDebug::addDirective(CartDebug::DisasmType type,
|
||||||
i->end = tag.start - 1;
|
i->end = tag.start - 1;
|
||||||
|
|
||||||
// Insert new endpoint
|
// Insert new endpoint
|
||||||
i++;
|
++i;
|
||||||
list.insert(i, tag2);
|
list.insert(i, tag2);
|
||||||
break; // no need to go further; this is the insertion point
|
break; // no need to go further; this is the insertion point
|
||||||
}
|
}
|
||||||
|
@ -1179,10 +1179,10 @@ string CartDebug::saveDisassembly()
|
||||||
out << "\n";
|
out << "\n";
|
||||||
out << ALIGN(16) << ourZPMnemonic[addr - 0x80] << "= $"
|
out << ALIGN(16) << ourZPMnemonic[addr - 0x80] << "= $"
|
||||||
<< Base::HEX2 << right << (addr)
|
<< Base::HEX2 << right << (addr)
|
||||||
<< (stackUsed|codeUsed ? "; (" : "")
|
<< ((stackUsed|codeUsed) ? "; (" : "")
|
||||||
<< (codeUsed ? "c" : "")
|
<< (codeUsed ? "c" : "")
|
||||||
<< (stackUsed ? "s" : "")
|
<< (stackUsed ? "s" : "")
|
||||||
<< (stackUsed | codeUsed ? ")" : "")
|
<< ((stackUsed | codeUsed) ? ")" : "")
|
||||||
<< "\n";
|
<< "\n";
|
||||||
addLine = false;
|
addLine = false;
|
||||||
} else if (ramUsed|codeUsed|stackUsed) {
|
} else if (ramUsed|codeUsed|stackUsed) {
|
||||||
|
|
|
@ -33,6 +33,8 @@ class CpuState : public DebuggerState
|
||||||
int PC, SP, PS, A, X, Y;
|
int PC, SP, PS, A, X, Y;
|
||||||
int srcS, srcA, srcX, srcY;
|
int srcS, srcA, srcX, srcY;
|
||||||
BoolArray PSbits;
|
BoolArray PSbits;
|
||||||
|
|
||||||
|
CpuState() : PC(0), SP(0), PS(0), A(0), X(0), Y(0), srcS(0), srcA(0), srcX(0), srcY(0) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
class CpuDebug : public DebuggerSystem
|
class CpuDebug : public DebuggerSystem
|
||||||
|
|
|
@ -293,10 +293,10 @@ string RiotDebug::dirP0String()
|
||||||
{
|
{
|
||||||
uInt8 reg = swcha();
|
uInt8 reg = swcha();
|
||||||
ostringstream buf;
|
ostringstream buf;
|
||||||
buf << (reg & 0x80 ? "" : "right ")
|
buf << ((reg & 0x80) ? "" : "right ")
|
||||||
<< (reg & 0x40 ? "" : "left ")
|
<< ((reg & 0x40) ? "" : "left ")
|
||||||
<< (reg & 0x20 ? "" : "left ")
|
<< ((reg & 0x20) ? "" : "left ")
|
||||||
<< (reg & 0x10 ? "" : "left ")
|
<< ((reg & 0x10) ? "" : "left ")
|
||||||
<< ((reg & 0xf0) == 0xf0 ? "(no directions) " : "");
|
<< ((reg & 0xf0) == 0xf0 ? "(no directions) " : "");
|
||||||
return buf.str();
|
return buf.str();
|
||||||
}
|
}
|
||||||
|
@ -306,10 +306,10 @@ string RiotDebug::dirP1String()
|
||||||
{
|
{
|
||||||
uInt8 reg = swcha();
|
uInt8 reg = swcha();
|
||||||
ostringstream buf;
|
ostringstream buf;
|
||||||
buf << (reg & 0x08 ? "" : "right ")
|
buf << ((reg & 0x08) ? "" : "right ")
|
||||||
<< (reg & 0x04 ? "" : "left ")
|
<< ((reg & 0x04) ? "" : "left ")
|
||||||
<< (reg & 0x02 ? "" : "left ")
|
<< ((reg & 0x02) ? "" : "left ")
|
||||||
<< (reg & 0x01 ? "" : "left ")
|
<< ((reg & 0x01) ? "" : "left ")
|
||||||
<< ((reg & 0x0f) == 0x0f ? "(no directions) " : "");
|
<< ((reg & 0x0f) == 0x0f ? "(no directions) " : "");
|
||||||
return buf.str();
|
return buf.str();
|
||||||
}
|
}
|
||||||
|
@ -336,8 +336,8 @@ string RiotDebug::tvTypeString()
|
||||||
string RiotDebug::switchesString()
|
string RiotDebug::switchesString()
|
||||||
{
|
{
|
||||||
ostringstream buf;
|
ostringstream buf;
|
||||||
buf << (swchb() & 0x2 ? "-" : "+") << "select "
|
buf << ((swchb() & 0x2) ? "-" : "+") << "select "
|
||||||
<< (swchb() & 0x1 ? "-" : "+") << "reset";
|
<< ((swchb() & 0x1) ? "-" : "+") << "reset";
|
||||||
return buf.str();
|
return buf.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,14 @@ class RiotState : public DebuggerState
|
||||||
// These are actually from the TIA, but are I/O related
|
// These are actually from the TIA, but are I/O related
|
||||||
uInt8 INPT0, INPT1, INPT2, INPT3, INPT4, INPT5;
|
uInt8 INPT0, INPT1, INPT2, INPT3, INPT4, INPT5;
|
||||||
bool INPTLatch, INPTDump;
|
bool INPTLatch, INPTDump;
|
||||||
|
|
||||||
|
RiotState()
|
||||||
|
: SWCHA_R(0), SWCHA_W(0), SWACNT(0), SWCHB_R(0), SWCHB_W(0), SWBCNT(0),
|
||||||
|
TIM1T(0), TIM8T(0), TIM64T(0), T1024T(0), INTIM(0), TIMINT(0),
|
||||||
|
TIMCLKS(0), INTIMCLKS(0), TIMDIV(0),
|
||||||
|
INPT0(0), INPT1(0), INPT2(0), INPT3(0), INPT4(0), INPT5(0),
|
||||||
|
INPTLatch(false), INPTDump(false)
|
||||||
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
class RiotDebug : public DebuggerSystem
|
class RiotDebug : public DebuggerSystem
|
||||||
|
|
|
@ -196,8 +196,8 @@ void CartridgeCMWidget::loadConfig()
|
||||||
myAudOut->setState(swcha & 0x40);
|
myAudOut->setState(swcha & 0x40);
|
||||||
|
|
||||||
// RAM state (several bits from SWCHA)
|
// RAM state (several bits from SWCHA)
|
||||||
const string& ram = swcha & 0x10 ? " Inactive" :
|
const string& ram = (swcha & 0x10) ? " Inactive" :
|
||||||
swcha & 0x20 ? " Read-only" : " Write-only";
|
(swcha & 0x20) ? " Read-only" : " Write-only";
|
||||||
myRAM->setText(ram, (swcha & 0x30) != (myOldState.swcha & 0x30));
|
myRAM->setText(ram, (swcha & 0x30) != (myOldState.swcha & 0x30));
|
||||||
|
|
||||||
CartDebugWidget::loadConfig();
|
CartDebugWidget::loadConfig();
|
||||||
|
@ -224,8 +224,8 @@ string CartridgeCMWidget::bankState()
|
||||||
ostringstream& buf = buffer();
|
ostringstream& buf = buffer();
|
||||||
|
|
||||||
buf << "Bank = " << std::dec << myCart.getBank()
|
buf << "Bank = " << std::dec << myCart.getBank()
|
||||||
<< ", RAM is" << (myCart.mySWCHA & 0x10 ? " Inactive" :
|
<< ", RAM is" << ((myCart.mySWCHA & 0x10) ? " Inactive" :
|
||||||
myCart.mySWCHA & 0x20 ? " Read-only" : " Write-only");
|
(myCart.mySWCHA & 0x20) ? " Read-only" : " Write-only");
|
||||||
|
|
||||||
return buf.str();
|
return buf.str();
|
||||||
}
|
}
|
||||||
|
|
|
@ -255,7 +255,7 @@ void CartridgeDASHWidget::updateUIState()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int bankno = segment & myCart.BIT_BANK_MASK;
|
int bankno = segment & myCart.BIT_BANK_MASK;
|
||||||
const string& banktype = segment & myCart.BITMASK_ROMRAM ? "RAM" : "ROM";
|
const string& banktype = (segment & myCart.BITMASK_ROMRAM) ? "RAM" : "ROM";
|
||||||
|
|
||||||
myBankNumber[i]->setSelected(bankno);
|
myBankNumber[i]->setSelected(bankno);
|
||||||
myBankType[i]->setSelected(banktype);
|
myBankType[i]->setSelected(banktype);
|
||||||
|
|
|
@ -80,7 +80,6 @@ CartRamWidget::CartRamWidget(
|
||||||
ypos += myDesc->getHeight() + myFontHeight / 2;
|
ypos += myDesc->getHeight() + myFontHeight / 2;
|
||||||
|
|
||||||
// Add RAM widget
|
// Add RAM widget
|
||||||
xpos = x + _font.getStringWidth("xxxx");
|
|
||||||
myRam = new InternalRamWidget(boss, lfont, nfont, 2, ypos, w, h-ypos, cartDebug);
|
myRam = new InternalRamWidget(boss, lfont, nfont, 2, ypos, w, h-ypos, cartDebug);
|
||||||
addToFocusList(myRam->getFocusList());
|
addToFocusList(myRam->getFocusList());
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@ FlashWidget::FlashWidget(GuiObject* boss, const GUI::Font& font,
|
||||||
: ControllerWidget(boss, font, x, y, controller),
|
: ControllerWidget(boss, font, x, y, controller),
|
||||||
myEEPROMEraseCurrent(nullptr)
|
myEEPROMEraseCurrent(nullptr)
|
||||||
{
|
{
|
||||||
|
std::fill(myPage, myPage + MAX_PAGES, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -80,10 +80,9 @@ RomListWidget::RomListWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
_rows = h / _fontHeight;
|
_rows = h / _fontHeight;
|
||||||
|
|
||||||
// Create a CheckboxWidget for each row in the list
|
// Create a CheckboxWidget for each row in the list
|
||||||
CheckboxWidget* t = nullptr;
|
|
||||||
for(int i = 0; i < _rows; ++i)
|
for(int i = 0; i < _rows; ++i)
|
||||||
{
|
{
|
||||||
t = new CheckboxWidget(boss, lfont, _x + 2, ypos, "",
|
CheckboxWidget* t = new CheckboxWidget(boss, lfont, _x + 2, ypos, "",
|
||||||
CheckboxWidget::kCheckActionCmd);
|
CheckboxWidget::kCheckActionCmd);
|
||||||
t->setTarget(this);
|
t->setTarget(this);
|
||||||
t->setID(i);
|
t->setID(i);
|
||||||
|
|
|
@ -242,7 +242,7 @@ uInt8 CartridgeDPC::peek(uInt16 address)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clock the selected data fetcher's counter if needed
|
// Clock the selected data fetcher's counter if needed
|
||||||
if((index < 5) || ((index >= 5) && (!myMusicMode[index - 5])))
|
if(index < 5 || !myMusicMode[index - 5])
|
||||||
{
|
{
|
||||||
myCounters[index] = (myCounters[index] - 1) & 0x07ff;
|
myCounters[index] = (myCounters[index] - 1) & 0x07ff;
|
||||||
}
|
}
|
||||||
|
|
|
@ -216,7 +216,7 @@ class Controller : public Serializable
|
||||||
*/
|
*/
|
||||||
virtual string about(bool swappedPorts) const
|
virtual string about(bool swappedPorts) const
|
||||||
{
|
{
|
||||||
return name() + " in " + ((myJack == Left) ^ swappedPorts ?
|
return name() + " in " + (((myJack == Left) ^ swappedPorts) ?
|
||||||
"left port" : "right port");
|
"left port" : "right port");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,8 @@ class DispatchResult
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
DispatchResult() : myStatus(Status::invalid) {}
|
DispatchResult()
|
||||||
|
: myStatus(Status::invalid), myCycles(0), myAddress(0), myWasReadTrap(false) { }
|
||||||
|
|
||||||
Status getStatus() const { return myStatus; }
|
Status getStatus() const { return myStatus; }
|
||||||
|
|
||||||
|
|
|
@ -88,6 +88,8 @@ MT24LC256::MT24LC256(const string& filename, const System& system)
|
||||||
|
|
||||||
// Then initialize the I2C state
|
// Then initialize the I2C state
|
||||||
jpee_init();
|
jpee_init();
|
||||||
|
|
||||||
|
systemReset();
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -149,7 +151,7 @@ void MT24LC256::update()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void MT24LC256::systemReset()
|
void MT24LC256::systemReset()
|
||||||
{
|
{
|
||||||
memset(myPageHit, false, sizeof(myPageHit));
|
std::fill(myPageHit, myPageHit + PAGE_NUM, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -63,7 +63,7 @@ void AudioChannel::phase0()
|
||||||
|
|
||||||
default:
|
default:
|
||||||
myNoiseFeedback =
|
myNoiseFeedback =
|
||||||
((myNoiseCounter & 0x04 ? 1 : 0) ^ (myNoiseCounter & 0x01)) ||
|
(((myNoiseCounter & 0x04) ? 1 : 0) ^ (myNoiseCounter & 0x01)) ||
|
||||||
myNoiseCounter == 0;
|
myNoiseCounter == 0;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -82,13 +82,12 @@ void AudioChannel::phase0()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
uInt8 AudioChannel::phase1()
|
uInt8 AudioChannel::phase1()
|
||||||
{
|
{
|
||||||
bool pulseFeedback = false;
|
|
||||||
|
|
||||||
if (myClockEnable) {
|
if (myClockEnable) {
|
||||||
|
bool pulseFeedback = false;
|
||||||
switch (myAudc >> 2) {
|
switch (myAudc >> 2) {
|
||||||
case 0x00:
|
case 0x00:
|
||||||
pulseFeedback =
|
pulseFeedback =
|
||||||
((myPulseCounter & 0x02 ? 1 : 0) ^ (myPulseCounter & 0x01)) &&
|
(((myPulseCounter & 0x02) ? 1 : 0) ^ (myPulseCounter & 0x01)) &&
|
||||||
(myPulseCounter != 0x0a) &&
|
(myPulseCounter != 0x0a) &&
|
||||||
(myAudc & 0x03);
|
(myAudc & 0x03);
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,6 @@ AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
xpos = HBORDER; ypos = VBORDER + _th;
|
xpos = HBORDER; ypos = VBORDER + _th;
|
||||||
|
|
||||||
// Enable sound
|
// Enable sound
|
||||||
xpos = HBORDER;
|
|
||||||
mySoundEnableCheckbox = new CheckboxWidget(this, font, xpos, ypos,
|
mySoundEnableCheckbox = new CheckboxWidget(this, font, xpos, ypos,
|
||||||
"Enable sound", kSoundEnableChanged);
|
"Enable sound", kSoundEnableChanged);
|
||||||
wid.push_back(mySoundEnableCheckbox);
|
wid.push_back(mySoundEnableCheckbox);
|
||||||
|
|
|
@ -33,10 +33,9 @@ CheckListWidget::CheckListWidget(GuiObject* boss, const GUI::Font& font,
|
||||||
_rows = h / _fontHeight;
|
_rows = h / _fontHeight;
|
||||||
|
|
||||||
// Create a CheckboxWidget for each row in the list
|
// Create a CheckboxWidget for each row in the list
|
||||||
CheckboxWidget* t = nullptr;
|
|
||||||
for(int i = 0; i < _rows; ++i)
|
for(int i = 0; i < _rows; ++i)
|
||||||
{
|
{
|
||||||
t = new CheckboxWidget(boss, font, _x + 2, ypos, "",
|
CheckboxWidget* t = new CheckboxWidget(boss, font, _x + 2, ypos, "",
|
||||||
CheckboxWidget::kCheckActionCmd);
|
CheckboxWidget::kCheckActionCmd);
|
||||||
t->setTextColor(kTextColor);
|
t->setTextColor(kTextColor);
|
||||||
t->setTarget(this);
|
t->setTarget(this);
|
||||||
|
|
|
@ -131,7 +131,6 @@ void DeveloperDialog::addEmulationTab(const GUI::Font& font)
|
||||||
ypos += lineHeight + VGAP;
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
// Randomize CPU
|
// Randomize CPU
|
||||||
lwidth = font.getStringWidth("Randomize CPU ");
|
|
||||||
myRandomizeCPULabel = new StaticTextWidget(myTab, font, HBORDER + INDENT * 2, ypos + 1, "Randomize CPU ");
|
myRandomizeCPULabel = new StaticTextWidget(myTab, font, HBORDER + INDENT * 2, ypos + 1, "Randomize CPU ");
|
||||||
wid.push_back(myRandomizeCPULabel);
|
wid.push_back(myRandomizeCPULabel);
|
||||||
|
|
||||||
|
@ -184,7 +183,6 @@ void DeveloperDialog::addVideoTab(const GUI::Font& font)
|
||||||
int tabID = myTab->addTab("Video");
|
int tabID = myTab->addTab("Video");
|
||||||
|
|
||||||
wid.clear();
|
wid.clear();
|
||||||
ypos = VBORDER;
|
|
||||||
|
|
||||||
// settings set
|
// settings set
|
||||||
mySettingsGroup1 = new RadioButtonGroup();
|
mySettingsGroup1 = new RadioButtonGroup();
|
||||||
|
|
|
@ -614,14 +614,11 @@ void GameInfoDialog::updateControllerStates()
|
||||||
const string& contrP0 = myP0Controller->getSelectedTag().toString();
|
const string& contrP0 = myP0Controller->getSelectedTag().toString();
|
||||||
const string& contrP1 = myP1Controller->getSelectedTag().toString();
|
const string& contrP1 = myP1Controller->getSelectedTag().toString();
|
||||||
bool enableEEEraseButton = false;
|
bool enableEEEraseButton = false;
|
||||||
bool enableSwapPaddles = false;
|
|
||||||
bool enableSwapPorts = false;
|
|
||||||
|
|
||||||
// Compumate bankswitching scheme doesn't allow to select controllers
|
// Compumate bankswitching scheme doesn't allow to select controllers
|
||||||
bool enableSelectControl = myType->getSelectedTag() != "CM";
|
bool enableSelectControl = myType->getSelectedTag() != "CM";
|
||||||
|
|
||||||
enableSwapPorts = enableSelectControl;
|
bool enableSwapPaddles = BSPF::startsWithIgnoreCase(contrP0, "PADDLES") ||
|
||||||
enableSwapPaddles = BSPF::startsWithIgnoreCase(contrP0, "PADDLES") ||
|
|
||||||
BSPF::startsWithIgnoreCase(contrP1, "PADDLES");
|
BSPF::startsWithIgnoreCase(contrP1, "PADDLES");
|
||||||
|
|
||||||
if(instance().hasConsole())
|
if(instance().hasConsole())
|
||||||
|
@ -630,10 +627,10 @@ void GameInfoDialog::updateControllerStates()
|
||||||
const Controller& rport = instance().console().rightController();
|
const Controller& rport = instance().console().rightController();
|
||||||
|
|
||||||
// we only enable the button if we have a valid previous and new controller.
|
// we only enable the button if we have a valid previous and new controller.
|
||||||
enableEEEraseButton = ((lport.type() == Controller::SaveKey && contrP0 == "SAVEKEY")
|
enableEEEraseButton = ((lport.type() == Controller::SaveKey && contrP0 == "SAVEKEY") ||
|
||||||
|| (lport.type() == Controller::AtariVox && contrP0 == "ATARIVOX")
|
(rport.type() == Controller::SaveKey && contrP1 == "SAVEKEY") ||
|
||||||
|| (rport.type() == Controller::SaveKey && contrP1 == "SAVEKEY")
|
(lport.type() == Controller::AtariVox && contrP0 == "ATARIVOX") ||
|
||||||
|| (rport.type() == Controller::AtariVox && contrP1 == "ATARIVOX"));
|
(rport.type() == Controller::AtariVox && contrP1 == "ATARIVOX"));
|
||||||
}
|
}
|
||||||
|
|
||||||
myP0Label->setEnabled(enableSelectControl);
|
myP0Label->setEnabled(enableSelectControl);
|
||||||
|
@ -641,7 +638,7 @@ void GameInfoDialog::updateControllerStates()
|
||||||
myP0Controller->setEnabled(enableSelectControl);
|
myP0Controller->setEnabled(enableSelectControl);
|
||||||
myP1Controller->setEnabled(enableSelectControl);
|
myP1Controller->setEnabled(enableSelectControl);
|
||||||
|
|
||||||
mySwapPorts->setEnabled(enableSwapPorts);
|
mySwapPorts->setEnabled(enableSelectControl);
|
||||||
mySwapPaddles->setEnabled(enableSwapPaddles);
|
mySwapPaddles->setEnabled(enableSwapPaddles);
|
||||||
|
|
||||||
myEraseEEPROMLabel->setEnabled(enableEEEraseButton);
|
myEraseEEPROMLabel->setEnabled(enableEEEraseButton);
|
||||||
|
|
|
@ -141,7 +141,6 @@ void InputDialog::addDevicePortTab(const GUI::Font& font)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
lwidth = font.getStringWidth("Digital paddle sensitivity ");
|
lwidth = font.getStringWidth("Digital paddle sensitivity ");
|
||||||
pwidth = font.getMaxCharWidth() * 8;
|
|
||||||
|
|
||||||
// Add joystick deadzone setting
|
// Add joystick deadzone setting
|
||||||
ypos += lineHeight + VGAP*3;
|
ypos += lineHeight + VGAP*3;
|
||||||
|
|
|
@ -134,11 +134,12 @@ void RomAuditDialog::auditRoms()
|
||||||
int renamed = 0, notfound = 0;
|
int renamed = 0, notfound = 0;
|
||||||
for(uInt32 idx = 0; idx < files.size(); idx++)
|
for(uInt32 idx = 0; idx < files.size(); idx++)
|
||||||
{
|
{
|
||||||
bool renameSucceeded = false;
|
|
||||||
string extension;
|
string extension;
|
||||||
if(files[idx].isFile() &&
|
if(files[idx].isFile() &&
|
||||||
LauncherFilterDialog::isValidRomName(files[idx], extension))
|
LauncherFilterDialog::isValidRomName(files[idx], extension))
|
||||||
{
|
{
|
||||||
|
bool renameSucceeded = false;
|
||||||
|
|
||||||
// Calculate the MD5 so we can get the rest of the info
|
// Calculate the MD5 so we can get the rest of the info
|
||||||
// from the PropertiesSet (stella.pro)
|
// from the PropertiesSet (stella.pro)
|
||||||
const string& md5 = MD5::hash(files[idx]);
|
const string& md5 = MD5::hash(files[idx]);
|
||||||
|
|
|
@ -59,7 +59,6 @@ SnapshotDialog::SnapshotDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
|
|
||||||
// Snapshot naming
|
// Snapshot naming
|
||||||
xpos = HBORDER; ypos += buttonHeight + V_GAP * 4;
|
xpos = HBORDER; ypos += buttonHeight + V_GAP * 4;
|
||||||
fwidth = font.getStringWidth("10 seconds");
|
|
||||||
|
|
||||||
// Snapshot interval (continuous mode)
|
// Snapshot interval (continuous mode)
|
||||||
mySnapInterval = new SliderWidget(this, font, xpos, ypos,
|
mySnapInterval = new SliderWidget(this, font, xpos, ypos,
|
||||||
|
|
|
@ -51,7 +51,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
const int HBORDER = 10;
|
const int HBORDER = 10;
|
||||||
const int INDENT = 16;
|
const int INDENT = 16;
|
||||||
int xpos, ypos, tabID;
|
int xpos, ypos, tabID;
|
||||||
int lwidth, pwidth = font.getStringWidth("Standard");
|
int lwidth, pwidth;
|
||||||
WidgetArray wid;
|
WidgetArray wid;
|
||||||
VariantList items;
|
VariantList items;
|
||||||
const GUI::Size& ds = instance().frameBuffer().desktopSize();
|
const GUI::Size& ds = instance().frameBuffer().desktopSize();
|
||||||
|
@ -61,7 +61,6 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
_h = (10+1) * (lineHeight + 4) + VBORDER + _th;
|
_h = (10+1) * (lineHeight + 4) + VBORDER + _th;
|
||||||
|
|
||||||
// The tab widget
|
// The tab widget
|
||||||
xpos = HBORDER; ypos = VBORDER;
|
|
||||||
myTab = new TabWidget(this, font, 2, 4 + _th, _w - 2*2, _h - _th - buttonHeight - 20);
|
myTab = new TabWidget(this, font, 2, 4 + _th, _w - 2*2, _h - _th - buttonHeight - 20);
|
||||||
addTabWidget(myTab);
|
addTabWidget(myTab);
|
||||||
|
|
||||||
|
|
|
@ -244,7 +244,6 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
|
|
||||||
// Custom adjustables (using macro voodoo)
|
// Custom adjustables (using macro voodoo)
|
||||||
xpos += INDENT - 2; ypos += 0;
|
xpos += INDENT - 2; ypos += 0;
|
||||||
pwidth = lwidth;
|
|
||||||
lwidth = font.getStringWidth("Saturation ");
|
lwidth = font.getStringWidth("Saturation ");
|
||||||
|
|
||||||
#define CREATE_CUSTOM_SLIDERS(obj, desc) \
|
#define CREATE_CUSTOM_SLIDERS(obj, desc) \
|
||||||
|
@ -271,7 +270,6 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
ypos = VBORDER;
|
ypos = VBORDER;
|
||||||
|
|
||||||
lwidth = font.getStringWidth("Intensity ");
|
lwidth = font.getStringWidth("Intensity ");
|
||||||
pwidth = font.getMaxCharWidth() * 6;
|
|
||||||
|
|
||||||
// TV Phosphor effect
|
// TV Phosphor effect
|
||||||
myTVPhosphor = new CheckboxWidget(myTab, font, xpos, ypos + 1, "Phosphor for all ROMs");
|
myTVPhosphor = new CheckboxWidget(myTab, font, xpos, ypos + 1, "Phosphor for all ROMs");
|
||||||
|
|
|
@ -131,7 +131,7 @@ void FilesystemNodeWINDOWS::addFile(AbstractFSList& list, ListMode mode,
|
||||||
if(!strncmp(asciiName, ".", 1) || !strncmp(asciiName, "..", 2))
|
if(!strncmp(asciiName, ".", 1) || !strncmp(asciiName, "..", 2))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
isDirectory = (find_data->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ? true : false);
|
isDirectory = ((find_data->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? true : false);
|
||||||
isFile = !isDirectory;//(find_data->dwFileAttributes & FILE_ATTRIBUTE_NORMAL ? true : false);
|
isFile = !isDirectory;//(find_data->dwFileAttributes & FILE_ATTRIBUTE_NORMAL ? true : false);
|
||||||
|
|
||||||
if((isFile && mode == FilesystemNode::kListDirectoriesOnly) ||
|
if((isFile && mode == FilesystemNode::kListDirectoriesOnly) ||
|
||||||
|
|
Loading…
Reference in New Issue