mirror of https://github.com/stella-emu/stella.git
Made the Driving class actually refer to Driving Controller events
instead of joystick events. This bug has been present in the codebase for over 3 years (at least). Thanks to Mark Grebe for pointing it out. This means that you will no longer be able to use a gamepad/joystick for both joystick *and* driving controller events at the same time; you'll have to map a particular device to either an internal Atari joystick *or* an internal Atari Driving Controller. This also means that the Driving Controller remapping now actually works. Previously, it didn't do anything. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@252 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
1753bb8b48
commit
af928f7dad
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: Driving.cxx,v 1.1.1.1 2001-12-27 19:54:21 bwmott Exp $
|
||||
// $Id: Driving.cxx,v 1.2 2004-05-28 19:08:12 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <assert.h>
|
||||
|
@ -52,22 +52,22 @@ bool Driving::read(DigitalPin pin)
|
|||
|
||||
if(myJack == Left)
|
||||
{
|
||||
if(myEvent.get(Event::JoystickZeroLeft) != 0)
|
||||
if(myEvent.get(Event::DrivingZeroCounterClockwise) != 0)
|
||||
{
|
||||
return (counterclockwise[(myCounter / delay) & 0x03] & 0x01) != 0;
|
||||
}
|
||||
else if(myEvent.get(Event::JoystickZeroRight) != 0)
|
||||
else if(myEvent.get(Event::DrivingZeroClockwise) != 0)
|
||||
{
|
||||
return (clockwise[(myCounter / delay) & 0x03] & 0x01) != 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(myEvent.get(Event::JoystickOneLeft) != 0)
|
||||
if(myEvent.get(Event::DrivingOneCounterClockwise) != 0)
|
||||
{
|
||||
return (counterclockwise[(myCounter / delay) & 0x03] & 0x01) != 0;
|
||||
}
|
||||
else if(myEvent.get(Event::JoystickOneRight) != 0)
|
||||
else if(myEvent.get(Event::DrivingOneClockwise) != 0)
|
||||
{
|
||||
return (clockwise[(myCounter / delay) & 0x03] & 0x01) != 0;
|
||||
}
|
||||
|
@ -76,22 +76,22 @@ bool Driving::read(DigitalPin pin)
|
|||
case Two:
|
||||
if(myJack == Left)
|
||||
{
|
||||
if(myEvent.get(Event::JoystickZeroLeft) != 0)
|
||||
if(myEvent.get(Event::DrivingZeroCounterClockwise) != 0)
|
||||
{
|
||||
return (counterclockwise[(myCounter / delay) & 0x03] & 0x02) != 0;
|
||||
}
|
||||
else if(myEvent.get(Event::JoystickZeroRight) != 0)
|
||||
else if(myEvent.get(Event::DrivingZeroClockwise) != 0)
|
||||
{
|
||||
return (clockwise[(myCounter / delay) & 0x03] & 0x02) != 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(myEvent.get(Event::JoystickOneLeft) != 0)
|
||||
if(myEvent.get(Event::DrivingOneCounterClockwise) != 0)
|
||||
{
|
||||
return (counterclockwise[(myCounter / delay) & 0x03] & 0x02) != 0;
|
||||
}
|
||||
else if(myEvent.get(Event::JoystickOneRight) != 0)
|
||||
else if(myEvent.get(Event::DrivingOneClockwise) != 0)
|
||||
{
|
||||
return (clockwise[(myCounter / delay) & 0x03] & 0x02) != 0;
|
||||
}
|
||||
|
@ -104,8 +104,8 @@ bool Driving::read(DigitalPin pin)
|
|||
return true;
|
||||
|
||||
case Six:
|
||||
return (myJack == Left) ? (myEvent.get(Event::JoystickZeroFire) == 0) :
|
||||
(myEvent.get(Event::JoystickOneFire) == 0);
|
||||
return (myJack == Left) ? (myEvent.get(Event::DrivingZeroFire) == 0) :
|
||||
(myEvent.get(Event::DrivingOneFire) == 0);
|
||||
|
||||
default:
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue