Mappings for joysticks beyond the first one are now actually loaded.

They were being saved correctly for all sticks, but only loaded for
the first one.

Removed some redundant settings related to TV effects stuff.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2289 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2011-12-18 19:43:24 +00:00
parent 65eee809f9
commit 4c8cfb3da0
3 changed files with 6 additions and 44 deletions

View File

@ -160,9 +160,9 @@ void EventHandler::setupJoysticks()
// Keep track of how many Stelladaptors we've found
int saCount = 0;
// Open up to 6 regular joysticks and 2 Stelladaptor devices
myNumJoysticks = SDL_NumJoysticks();
myJoysticks = new StellaJoystick[myNumJoysticks];
// Open all SDL joysticks (only the first 2 Stelladaptor devices are used)
if((myNumJoysticks = SDL_NumJoysticks()) > 0)
myJoysticks = new StellaJoystick[myNumJoysticks];
for(uInt32 i = 0; i < myNumJoysticks; ++i)
{
string name = myJoysticks[i].setStick(i);
@ -1328,10 +1328,7 @@ void EventHandler::setJoymap()
{
map<string,string>::const_iterator iter = myJoystickMap.find(joy.name);
if(iter != myJoystickMap.end())
{
joy.setMap(iter->second);
break;
}
}
}
#endif
@ -2634,7 +2631,7 @@ void EventHandler::StellaJoystick::eraseEvent(Event::Type event, EventMode mode)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void EventHandler::StellaJoystick::getValues(string& list, IntArray& map)
void EventHandler::StellaJoystick::getValues(const string& list, IntArray& map)
{
map.clear();
istringstream buf(list);

View File

@ -431,6 +431,7 @@ class EventHandler
public:
StellaJoystick();
virtual ~StellaJoystick();
string setStick(int i);
string getMap() const;
bool setMap(const string& map);
@ -457,7 +458,7 @@ class EventHandler
int* axisLastValue;
private:
void getValues(string& list, IntArray& map);
void getValues(const string& list, IntArray& map);
private:
SDL_Joystick* stick;

View File

@ -59,15 +59,6 @@ Settings::Settings(OSystem* osystem)
setInternal("timing", "sleep");
setInternal("uimessages", "true");
// TV filter options
#if 0
setInternal("tv_tex", "off");
setInternal("tv_bleed", "off");
setInternal("tv_noise", "off");
// setInternal("tv_curve", "false"); // not yet implemented
setInternal("tv_phos", "false");
#endif
// Sound options
setInternal("sound", "true");
setInternal("fragsize", "512");
@ -312,18 +303,6 @@ void Settings::validate()
if(i < 0) setInternal("romviewer", "0");
else if(i > 2) setInternal("romviewer", "2");
s = getString("tv_tex");
if(s != "normal" && s != "stag")
setInternal("tv_tex", "off");
s = getString("tv_bleed");
if(s != "low" && s != "medium" && s != "high")
setInternal("tv_bleed", "off");
s = getString("tv_noise");
if(s != "low" && s != "medium" && s != "high")
setInternal("tv_noise", "off");
i = getInt("loglevel");
if(i < 0 || i > 2)
setInternal("loglevel", "1");
@ -355,21 +334,6 @@ void Settings::usage()
<< " -gl_fsmax <1|0> Stretch GL image in fullscreen emulation mode\n"
<< " -gl_vsync <1|0> Enable 'synchronize to vertical blank interrupt'\n"
<< " -gl_vbo <1|0> Enable 'vertex buffer objects'\n"
#if 0
<< " -gl_accel <1|0> Enable SDL_GL_ACCELERATED_VISUAL\n"
<< " -tv_tex <off|type> OpenGL TV texturing, type is one of the following:\n"
<< " normal Aligned in a grid\n"
<< " stag Aligned in a staggered grid\n"
<< " -tv_bleed <off|type> OpenGL TV color bleed, type is one of the following:\n"
<< " low \n"
<< " medium \n"
<< " high \n"
<< " -tv_noise <off|type> OpenGL TV RF noise emulation, type is one of the following:\n"
<< " low \n"
<< " medium \n"
<< " high \n"
<< " -tv_phos <1|0> OpenGL TV phosphor burn-off\n"
#endif
<< endl
#endif
<< " -tia_filter <filter> Use the specified filter in emulation mode\n"