mirror of https://github.com/stella-emu/stella.git
Fixed some warning that showed up in gcc but not clang++, and vice
versa (I guess it's useful to test under multiple compilers). Bumped version # for next test release. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3008 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
2d9eb76510
commit
fe1713ee87
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
#define STELLA_VERSION "4.2_pre"
|
#define STELLA_VERSION "4.2_beta1"
|
||||||
#define STELLA_BUILD atoi("$Rev$" + 6)
|
#define STELLA_BUILD atoi("$Rev$" + 6)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1778,7 +1778,7 @@ void EventHandler::takeSnapshot(uInt32 number)
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void EventHandler::setMouseControllerMode(const string& enable)
|
void EventHandler::setMouseControllerMode(const string& enable)
|
||||||
{
|
{
|
||||||
if(&myOSystem.console())
|
if(myOSystem.hasConsole())
|
||||||
{
|
{
|
||||||
delete myMouseControl; myMouseControl = NULL;
|
delete myMouseControl; myMouseControl = NULL;
|
||||||
|
|
||||||
|
@ -1851,7 +1851,7 @@ void EventHandler::leaveMenuMode()
|
||||||
bool EventHandler::enterDebugMode()
|
bool EventHandler::enterDebugMode()
|
||||||
{
|
{
|
||||||
#ifdef DEBUGGER_SUPPORT
|
#ifdef DEBUGGER_SUPPORT
|
||||||
if(myState == S_DEBUGGER || !(&myOSystem.console()))
|
if(myState == S_DEBUGGER || !myOSystem.hasConsole())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Make sure debugger starts in a consistent state
|
// Make sure debugger starts in a consistent state
|
||||||
|
@ -1955,15 +1955,10 @@ void EventHandler::setEventState(State state)
|
||||||
|
|
||||||
// Inform various subsystems about the new state
|
// Inform various subsystems about the new state
|
||||||
myOSystem.stateChanged(myState);
|
myOSystem.stateChanged(myState);
|
||||||
if(&myOSystem.frameBuffer())
|
myOSystem.frameBuffer().stateChanged(myState);
|
||||||
{
|
myOSystem.frameBuffer().setCursorState();
|
||||||
myOSystem.frameBuffer().stateChanged(myState);
|
if(myOSystem.hasConsole())
|
||||||
myOSystem.frameBuffer().setCursorState();
|
|
||||||
}
|
|
||||||
if(&myOSystem.console())
|
|
||||||
{
|
|
||||||
myOSystem.console().stateChanged(myState);
|
myOSystem.console().stateChanged(myState);
|
||||||
}
|
|
||||||
|
|
||||||
// Always clear any pending events when changing states
|
// Always clear any pending events when changing states
|
||||||
myEvent.clear();
|
myEvent.clear();
|
||||||
|
|
|
@ -439,7 +439,7 @@ class EventHandler
|
||||||
void saveMapping();
|
void saveMapping();
|
||||||
|
|
||||||
const StellaJoystick* joy(int id) const {
|
const StellaJoystick* joy(int id) const {
|
||||||
return id < mySticks.size() ? mySticks[id] : NULL;
|
return id < (int)mySticks.size() ? mySticks[id] : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -360,7 +360,7 @@ int EventHandler::JoystickHandler::remove(int index)
|
||||||
|
|
||||||
// Sticks that are removed must have initially been added
|
// Sticks that are removed must have initially been added
|
||||||
// So we use the 'active' joystick list to access them
|
// So we use the 'active' joystick list to access them
|
||||||
if(index >= 0 && index < mySticks.size() && mySticks[index] != NULL)
|
if(index >= 0 && index < (int)mySticks.size() && mySticks[index] != NULL)
|
||||||
{
|
{
|
||||||
StellaJoystick* stick = mySticks[index];
|
StellaJoystick* stick = mySticks[index];
|
||||||
|
|
||||||
|
|
|
@ -81,46 +81,48 @@ class OSystem
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
Get the event handler of the system
|
Get the event handler of the system.
|
||||||
|
|
||||||
@return The event handler
|
@return The event handler
|
||||||
*/
|
*/
|
||||||
EventHandler& eventHandler() const { return *myEventHandler; }
|
EventHandler& eventHandler() const { return *myEventHandler; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Get the frame buffer of the system
|
Get the frame buffer of the system.
|
||||||
|
|
||||||
@return The frame buffer
|
@return The frame buffer
|
||||||
*/
|
*/
|
||||||
FrameBuffer& frameBuffer() const { return *myFrameBuffer; }
|
FrameBuffer& frameBuffer() const { return *myFrameBuffer; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Get the sound object of the system
|
Get the sound object of the system.
|
||||||
|
|
||||||
@return The sound object
|
@return The sound object
|
||||||
*/
|
*/
|
||||||
Sound& sound() const { return *mySound; }
|
Sound& sound() const { return *mySound; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Get the settings object of the system
|
Get the settings object of the system.
|
||||||
|
|
||||||
@return The settings object
|
@return The settings object
|
||||||
*/
|
*/
|
||||||
Settings& settings() const { return *mySettings; }
|
Settings& settings() const { return *mySettings; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Get the set of game properties for the system
|
Get the set of game properties for the system.
|
||||||
|
|
||||||
@return The properties set object
|
@return The properties set object
|
||||||
*/
|
*/
|
||||||
PropertiesSet& propSet() const { return *myPropSet; }
|
PropertiesSet& propSet() const { return *myPropSet; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Get the console of the system.
|
Get the console of the system. The console won't always exist,
|
||||||
|
so we should test if it's available.
|
||||||
|
|
||||||
@return The console object
|
@return The console object
|
||||||
*/
|
*/
|
||||||
Console& console() const { return *myConsole; }
|
Console& console() const { return *myConsole; }
|
||||||
|
bool hasConsole() const { return myConsole != NULL; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Get the serial port of the system.
|
Get the serial port of the system.
|
||||||
|
|
|
@ -168,7 +168,7 @@ void StateManager::update()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void StateManager::loadState(int slot)
|
void StateManager::loadState(int slot)
|
||||||
{
|
{
|
||||||
if(&myOSystem->console())
|
if(myOSystem->hasConsole())
|
||||||
{
|
{
|
||||||
if(slot < 0) slot = myCurrentSlot;
|
if(slot < 0) slot = myCurrentSlot;
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ void StateManager::loadState(int slot)
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void StateManager::saveState(int slot)
|
void StateManager::saveState(int slot)
|
||||||
{
|
{
|
||||||
if(&myOSystem->console())
|
if(myOSystem->hasConsole())
|
||||||
{
|
{
|
||||||
if(slot < 0) slot = myCurrentSlot;
|
if(slot < 0) slot = myCurrentSlot;
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ void StateManager::changeState()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
bool StateManager::loadState(Serializer& in)
|
bool StateManager::loadState(Serializer& in)
|
||||||
{
|
{
|
||||||
if(&myOSystem->console())
|
if(myOSystem->hasConsole())
|
||||||
{
|
{
|
||||||
// Make sure the file can be opened for reading
|
// Make sure the file can be opened for reading
|
||||||
if(in.isValid())
|
if(in.isValid())
|
||||||
|
@ -290,7 +290,7 @@ bool StateManager::saveState(Serializer& out)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if(&myOSystem->console())
|
if(myOSystem->hasConsole())
|
||||||
{
|
{
|
||||||
// Make sure the file can be opened for writing
|
// Make sure the file can be opened for writing
|
||||||
if(out.isValid())
|
if(out.isValid())
|
||||||
|
|
|
@ -166,7 +166,7 @@ void AudioDialog::saveConfig()
|
||||||
|
|
||||||
// Only force a re-initialization when necessary, since it can
|
// Only force a re-initialization when necessary, since it can
|
||||||
// be a time-consuming operation
|
// be a time-consuming operation
|
||||||
if(&instance().console())
|
if(instance().hasConsole())
|
||||||
instance().console().initializeAudio();
|
instance().console().initializeAudio();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -379,13 +379,13 @@ void GameInfoDialog::loadConfig()
|
||||||
myPropertiesLoaded = false;
|
myPropertiesLoaded = false;
|
||||||
myDefaultsSelected = false;
|
myDefaultsSelected = false;
|
||||||
|
|
||||||
if(&instance().console())
|
if(instance().hasConsole())
|
||||||
{
|
{
|
||||||
myGameProperties = instance().console().properties();
|
myGameProperties = instance().console().properties();
|
||||||
myPropertiesLoaded = true;
|
myPropertiesLoaded = true;
|
||||||
loadView();
|
loadView();
|
||||||
}
|
}
|
||||||
else if(&instance().launcher())
|
else
|
||||||
{
|
{
|
||||||
const string& md5 = instance().launcher().selectedRomMD5();
|
const string& md5 = instance().launcher().selectedRomMD5();
|
||||||
if(md5 != "")
|
if(md5 != "")
|
||||||
|
@ -506,7 +506,7 @@ void GameInfoDialog::saveConfig()
|
||||||
instance().propSet().insert(myGameProperties);
|
instance().propSet().insert(myGameProperties);
|
||||||
|
|
||||||
// In any event, inform the Console and save the properties
|
// In any event, inform the Console and save the properties
|
||||||
if(&instance().console())
|
if(instance().hasConsole())
|
||||||
instance().console().setProperties(myGameProperties);
|
instance().console().setProperties(myGameProperties);
|
||||||
instance().propSet().save(instance().propertiesFile());
|
instance().propSet().save(instance().propertiesFile());
|
||||||
}
|
}
|
||||||
|
|
|
@ -416,7 +416,7 @@ void VideoDialog::saveConfig()
|
||||||
// Framerate
|
// Framerate
|
||||||
int i = myFrameRate->getValue();
|
int i = myFrameRate->getValue();
|
||||||
instance().settings().setValue("framerate", i);
|
instance().settings().setValue("framerate", i);
|
||||||
if(&instance().console())
|
if(instance().hasConsole())
|
||||||
{
|
{
|
||||||
// Make sure auto-frame calculation is only enabled when necessary
|
// Make sure auto-frame calculation is only enabled when necessary
|
||||||
instance().console().tia().enableAutoFrame(i <= 0);
|
instance().console().tia().enableAutoFrame(i <= 0);
|
||||||
|
@ -428,7 +428,7 @@ void VideoDialog::saveConfig()
|
||||||
|
|
||||||
// PAL color-loss effect
|
// PAL color-loss effect
|
||||||
instance().settings().setValue("colorloss", myColorLoss->getState());
|
instance().settings().setValue("colorloss", myColorLoss->getState());
|
||||||
if(&instance().console())
|
if(instance().hasConsole())
|
||||||
instance().console().toggleColorLoss(myColorLoss->getState());
|
instance().console().toggleColorLoss(myColorLoss->getState());
|
||||||
|
|
||||||
// Fullscreen stretch setting
|
// Fullscreen stretch setting
|
||||||
|
|
Loading…
Reference in New Issue