From 7ca813cc1b34af5ec4bcf7fa33a5311ebdf9621f Mon Sep 17 00:00:00 2001 From: bwmott Date: Mon, 16 Dec 2002 06:24:18 +0000 Subject: [PATCH] Fixed a bug reported by Erik Eid in the stella@biglist.com during August 2002 regarding the difficulty switches being reversed. It looks like this bug was introduced in the 1.0 release of Stella (only took 4 years to find and fix it :-) git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@162 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/src/emucore/Switches.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/stella/src/emucore/Switches.cxx b/stella/src/emucore/Switches.cxx index d56865723..cdfcc80fb 100644 --- a/stella/src/emucore/Switches.cxx +++ b/stella/src/emucore/Switches.cxx @@ -8,12 +8,12 @@ // SS SS tt ee ll ll aa aa // SSSS ttt eeeee llll llll aaaaa // -// Copyright (c) 1995-1998 by Bradford W. Mott +// Copyright (c) 1995-2002 by Bradford W. Mott // // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: Switches.cxx,v 1.1.1.1 2001-12-27 19:54:23 bwmott Exp $ +// $Id: Switches.cxx,v 1.2 2002-12-16 06:24:18 bwmott Exp $ //============================================================================ #include "Event.hxx" @@ -72,20 +72,20 @@ uInt8 Switches::read() if(myEvent.get(Event::ConsoleRightDifficultyA) != 0) { - mySwitches &= ~0x80; + mySwitches |= 0x80; } else if(myEvent.get(Event::ConsoleRightDifficultyB) != 0) { - mySwitches |= 0x80; + mySwitches &= ~0x80; } if(myEvent.get(Event::ConsoleLeftDifficultyA) != 0) { - mySwitches &= ~0x40; + mySwitches |= 0x40; } else if(myEvent.get(Event::ConsoleLeftDifficultyB) != 0) { - mySwitches |= 0x40; + mySwitches &= ~0x40; } if(myEvent.get(Event::ConsoleSelect) != 0)