From 91c5020a38ecc95a53a33d07c4f9543e49512862 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sun, 30 Jul 2017 11:48:52 -0230 Subject: [PATCH] Updated Visual Studio project file for Controller refactoring. - Some minor code refactoring/changes - Updated changelog and bumped version number. --- Changes.txt | 3 +++ src/common/Version.hxx | 2 +- src/emucore/AmigaMouse.hxx | 4 +--- src/emucore/AtariMouse.hxx | 4 +--- src/emucore/PointingDevice.hxx | 5 ++++- src/emucore/TrakBall.hxx | 7 ++----- src/windows/Stella.vcxproj | 3 --- src/windows/Stella.vcxproj.filters | 9 --------- 8 files changed, 12 insertions(+), 25 deletions(-) diff --git a/Changes.txt b/Changes.txt index ece4b6459..958d7b49a 100644 --- a/Changes.txt +++ b/Changes.txt @@ -14,6 +14,9 @@ 5.0.1 to 5.x: (xxxx yy, 2017) + * Improved emulation of Trakball controller, eliminating bias in left/ + right directions. Thanks to Thomas Jentzsch for the idea and code. + * Fixed an annoying bug in Linux, where Alt-Tab'ing out of a window and then back again would pass a 'Tab' key event to the app, which in most cases would navigate to the next UI element. diff --git a/src/common/Version.hxx b/src/common/Version.hxx index 313e78d88..4daf557a6 100644 --- a/src/common/Version.hxx +++ b/src/common/Version.hxx @@ -18,7 +18,7 @@ #ifndef VERSION_HXX #define VERSION_HXX -#define STELLA_VERSION "5.0.1" +#define STELLA_VERSION "5.0.2_pre" #define STELLA_BUILD "3487" #endif diff --git a/src/emucore/AmigaMouse.hxx b/src/emucore/AmigaMouse.hxx index 52562f57f..8b7905e86 100644 --- a/src/emucore/AmigaMouse.hxx +++ b/src/emucore/AmigaMouse.hxx @@ -34,12 +34,10 @@ namespace { public: static constexpr Controller::Type controllerType = Controller::AmigaMouse; - static constexpr uInt8 counterDivide = 2; }; - } -typedef PointingDevice AmigaMouse; +using AmigaMouse = PointingDevice; #endif // AMIGAMOUSE_HXX diff --git a/src/emucore/AtariMouse.hxx b/src/emucore/AtariMouse.hxx index 48e068d1a..a83ffc0b9 100644 --- a/src/emucore/AtariMouse.hxx +++ b/src/emucore/AtariMouse.hxx @@ -34,12 +34,10 @@ namespace { public: static constexpr Controller::Type controllerType = Controller::AtariMouse; - static constexpr uInt8 counterDivide = 2; }; - } -typedef PointingDevice AtariMouse; +using AtariMouse = PointingDevice; #endif // ATARIMOUSE_HXX diff --git a/src/emucore/PointingDevice.hxx b/src/emucore/PointingDevice.hxx index 601472ef8..d5a05eb26 100644 --- a/src/emucore/PointingDevice.hxx +++ b/src/emucore/PointingDevice.hxx @@ -27,8 +27,11 @@ This code was heavily borrowed from z26. @author Stephen Anthony & z26 team + Template-ification by Christian Speckner, based on ideas by + Thomas Jentzsch */ -template class PointingDevice : public Controller +template +class PointingDevice : public Controller { public: PointingDevice(Jack jack, const Event& event, const System& system); diff --git a/src/emucore/TrakBall.hxx b/src/emucore/TrakBall.hxx index c0fa0f9ec..0c7006851 100644 --- a/src/emucore/TrakBall.hxx +++ b/src/emucore/TrakBall.hxx @@ -29,18 +29,15 @@ namespace { static constexpr uInt32 ourTableH[2][2] = {{ 0x40, 0x00 }, { 0xc0, 0x80 }}; static constexpr uInt32 ourTableV[2][2] = {{ 0x00, 0x10 }, { 0x20, 0x30 }}; - return ourTableV[countV & 0x01][down] | - ourTableH[countH & 0x01][left]; + return ourTableV[countV & 0x01][down] | ourTableH[countH & 0x01][left]; } public: static constexpr Controller::Type controllerType = Controller::TrakBall; - static constexpr uInt8 counterDivide = 4; }; - } -typedef PointingDevice TrakBall; +using TrakBall = PointingDevice; #endif // TRAKBALL_HXX diff --git a/src/windows/Stella.vcxproj b/src/windows/Stella.vcxproj index 7cf7f4110..7aaedb19b 100644 --- a/src/windows/Stella.vcxproj +++ b/src/windows/Stella.vcxproj @@ -292,8 +292,6 @@ - - @@ -326,7 +324,6 @@ - diff --git a/src/windows/Stella.vcxproj.filters b/src/windows/Stella.vcxproj.filters index b1b815c94..0806dacaa 100644 --- a/src/windows/Stella.vcxproj.filters +++ b/src/windows/Stella.vcxproj.filters @@ -816,15 +816,6 @@ Source Files\emucore\tia - - Source Files\emucore - - - Source Files\emucore - - - Source Files\emucore - Source Files\debugger