mirror of https://github.com/stella-emu/stella.git
JSON joystick mappings, still missing load and migration.
This commit is contained in:
parent
ffb366f273
commit
4314c0cdeb
|
@ -16,6 +16,9 @@
|
|||
//============================================================================
|
||||
|
||||
#include "JoyMap.hxx"
|
||||
#include "jsonDefinitions.hxx"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void JoyMap::add(const Event::Type event, const JoyMapping& mapping)
|
||||
|
@ -183,48 +186,26 @@ JoyMap::JoyMappingArray JoyMap::getEventMapping(const Event::Type event, const E
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
string JoyMap::saveMapping(const EventMode mode) const
|
||||
json JoyMap::saveMapping(const EventMode mode) const
|
||||
{
|
||||
using MapType = std::pair<JoyMapping, Event::Type>;
|
||||
std::vector<MapType> sortedMap(myMap.begin(), myMap.end());
|
||||
json eventMappings = json::array();
|
||||
|
||||
std::sort(sortedMap.begin(), sortedMap.end(),
|
||||
[](const MapType& a, const MapType& b)
|
||||
{
|
||||
// Event::Type first
|
||||
if(a.second != b.second)
|
||||
return a.second < b.second;
|
||||
for (auto& item: myMap) {
|
||||
if (item.first.mode != mode) continue;
|
||||
|
||||
if(a.first.button != b.first.button)
|
||||
return a.first.button < b.first.button;
|
||||
json eventMapping = json::object();
|
||||
|
||||
if(a.first.axis != b.first.axis)
|
||||
return a.first.axis < b.first.axis;
|
||||
eventMapping["event"] = item.second;
|
||||
eventMapping["button"] = item.first.button;
|
||||
eventMapping["axis"] = item.first.axis;
|
||||
eventMapping["axisDirection"] = item.first.adir;
|
||||
eventMapping["hat"] = item.first.hat;
|
||||
eventMapping["hatDirection"] = item.first.hdir;
|
||||
|
||||
if(a.first.adir != b.first.adir)
|
||||
return a.first.adir < b.first.adir;
|
||||
|
||||
if(a.first.hat != b.first.hat)
|
||||
return a.first.hat < b.first.hat;
|
||||
|
||||
return a.first.hdir < b.first.hdir;
|
||||
}
|
||||
);
|
||||
|
||||
ostringstream buf;
|
||||
|
||||
for (auto item : sortedMap)
|
||||
{
|
||||
if (item.first.mode == mode)
|
||||
{
|
||||
if (buf.str() != "")
|
||||
buf << "|";
|
||||
buf << item.second << ":" << item.first.button << ","
|
||||
<< int(item.first.axis) << "," << int(item.first.adir) << ","
|
||||
<< item.first.hat << "," << int(item.first.hdir);
|
||||
}
|
||||
eventMappings.push_back(eventMapping);
|
||||
}
|
||||
return buf.str();
|
||||
|
||||
return eventMappings;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "Event.hxx"
|
||||
#include "EventHandlerConstants.hxx"
|
||||
#include "json.hxx"
|
||||
|
||||
/**
|
||||
This class handles controller mappings in Stella.
|
||||
|
@ -110,7 +111,7 @@ class JoyMap
|
|||
|
||||
JoyMappingArray getEventMapping(const Event::Type event, const EventMode mode) const;
|
||||
|
||||
string saveMapping(const EventMode mode) const;
|
||||
nlohmann::json saveMapping(const EventMode mode) const;
|
||||
int loadMapping(string& list, const EventMode mode);
|
||||
|
||||
/** Erase all mappings for given mode */
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
|
||||
static constexpr char CTRL_DELIM = '^';
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
PhysicalJoystickHandler::PhysicalJoystickHandler(
|
||||
OSystem& system, EventHandler& handler)
|
||||
|
@ -51,7 +53,8 @@ PhysicalJoystickHandler::PhysicalJoystickHandler(
|
|||
istringstream namebuf(joymap);
|
||||
getline(namebuf, joyname, PhysicalJoystick::MODE_DELIM);
|
||||
if(joyname.length() != 0)
|
||||
myDatabase.emplace(joyname, StickInfo(joymap));
|
||||
// TODO: convert old mapping to json
|
||||
myDatabase.emplace(joyname, StickInfo());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -526,15 +529,16 @@ void PhysicalJoystickHandler::saveMapping()
|
|||
{
|
||||
// Save the joystick mapping hash table, making sure to update it with
|
||||
// any changes that have been made during the program run
|
||||
ostringstream joybuf;
|
||||
json mapping = json::array();
|
||||
|
||||
for(const auto& i: myDatabase)
|
||||
{
|
||||
const string& map = i.second.joy ? i.second.joy->getMap() : i.second.mapping;
|
||||
if(map != "")
|
||||
joybuf << CTRL_DELIM << map;
|
||||
json map = i.second.joy ? i.second.joy->getMap() : i.second.mapping;
|
||||
|
||||
if (!map.is_null()) mapping.emplace_back(map);
|
||||
}
|
||||
myOSystem.settings().setValue("joymap", joybuf.str());
|
||||
|
||||
myOSystem.settings().setValue("joymap", mapping.dump());
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -28,6 +28,7 @@ class Event;
|
|||
#include "EventHandlerConstants.hxx"
|
||||
#include "PhysicalJoystick.hxx"
|
||||
#include "Variant.hxx"
|
||||
#include "json.hxx"
|
||||
|
||||
using PhysicalJoystickPtr = shared_ptr<PhysicalJoystick>;
|
||||
|
||||
|
@ -48,10 +49,10 @@ class PhysicalJoystickHandler
|
|||
private:
|
||||
struct StickInfo
|
||||
{
|
||||
StickInfo(const string& map = EmptyString, PhysicalJoystickPtr stick = nullptr)
|
||||
StickInfo(const nlohmann::json& map = nullptr, PhysicalJoystickPtr stick = nullptr)
|
||||
: mapping(map), joy(std::move(stick)) {}
|
||||
|
||||
string mapping;
|
||||
nlohmann::json mapping;
|
||||
PhysicalJoystickPtr joy;
|
||||
|
||||
friend ostream& operator<<(ostream& os, const StickInfo& si) {
|
||||
|
|
|
@ -22,6 +22,17 @@
|
|||
#include "Vec.hxx"
|
||||
#include "bspf.hxx"
|
||||
#include "PhysicalJoystick.hxx"
|
||||
#include "jsonDefinitions.hxx"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace {
|
||||
string jsonName(EventMode eventMode) {
|
||||
json serializedName = eventMode;
|
||||
|
||||
return serializedName.get<string>();
|
||||
}
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void PhysicalJoystick::initialize(int index, const string& desc,
|
||||
|
@ -45,21 +56,18 @@ void PhysicalJoystick::initialize(int index, const string& desc,
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
string PhysicalJoystick::getMap() const
|
||||
json PhysicalJoystick::getMap() const
|
||||
{
|
||||
// The mapping structure (for remappable devices) is defined as follows:
|
||||
// <NAME>'>'<MODE>['|'(<EVENT>':'<BUTTON>','<AXIS>','<VALUE>)|(<EVENT>':'<BUTTON>','<HAT>','<HATDIR>)]
|
||||
json mapping = json::object();
|
||||
|
||||
ostringstream joybuf;
|
||||
mapping["name"] = name;
|
||||
|
||||
joybuf << name;
|
||||
joybuf << MODE_DELIM << int(EventMode::kMenuMode) << "|" << joyMap.saveMapping(EventMode::kMenuMode);
|
||||
joybuf << MODE_DELIM << int(EventMode::kJoystickMode) << "|" << joyMap.saveMapping(EventMode::kJoystickMode);
|
||||
joybuf << MODE_DELIM << int(EventMode::kPaddlesMode) << "|" << joyMap.saveMapping(EventMode::kPaddlesMode);
|
||||
joybuf << MODE_DELIM << int(EventMode::kKeypadMode) << "|" << joyMap.saveMapping(EventMode::kKeypadMode);
|
||||
joybuf << MODE_DELIM << int(EventMode::kCommonMode) << "|" << joyMap.saveMapping(EventMode::kCommonMode);
|
||||
for (auto& mode: {
|
||||
EventMode::kMenuMode, EventMode::kJoystickMode, EventMode::kPaddlesMode, EventMode::kKeypadMode, EventMode::kCommonMode
|
||||
})
|
||||
mapping[jsonName(mode)] = joyMap.saveMapping(mode);
|
||||
|
||||
return joybuf.str();
|
||||
return mapping;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "Event.hxx"
|
||||
#include "EventHandlerConstants.hxx"
|
||||
#include "JoyMap.hxx"
|
||||
#include "json.hxx"
|
||||
|
||||
/**
|
||||
An abstraction of a physical (real) joystick in Stella.
|
||||
|
@ -44,7 +45,7 @@ class PhysicalJoystick
|
|||
public:
|
||||
PhysicalJoystick() = default;
|
||||
|
||||
string getMap() const;
|
||||
nlohmann::json getMap() const;
|
||||
bool setMap(const string& map);
|
||||
void eraseMap(EventMode mode);
|
||||
void eraseEvent(Event::Type event, EventMode mode);
|
||||
|
|
|
@ -0,0 +1,343 @@
|
|||
#ifndef JSON_DEFINITIONS_HXX
|
||||
#define JSON_DEFINITIONS_HXX
|
||||
|
||||
#include "EventHandlerConstants.hxx"
|
||||
#include "Event.hxx"
|
||||
#include "json.hxx"
|
||||
|
||||
NLOHMANN_JSON_SERIALIZE_ENUM(JoyAxis, {
|
||||
{JoyAxis::X, "x"},
|
||||
{JoyAxis::Y, "y"},
|
||||
{JoyAxis::Z, "z"},
|
||||
{JoyAxis::A3, "a3"},
|
||||
{JoyAxis::NONE, nullptr}
|
||||
})
|
||||
|
||||
NLOHMANN_JSON_SERIALIZE_ENUM(JoyDir, {
|
||||
{JoyDir::ANALOG, "analog"},
|
||||
{JoyDir::NEG, "negative"},
|
||||
{JoyDir::NONE, "none"},
|
||||
{JoyDir::POS, "position"}
|
||||
})
|
||||
|
||||
NLOHMANN_JSON_SERIALIZE_ENUM(JoyHatDir, {
|
||||
{JoyHatDir::CENTER, "center"},
|
||||
{JoyHatDir::DOWN, "down"},
|
||||
{JoyHatDir::LEFT, "left"},
|
||||
{JoyHatDir::RIGHT, "right"},
|
||||
{JoyHatDir::UP, "up"}
|
||||
});
|
||||
|
||||
NLOHMANN_JSON_SERIALIZE_ENUM(EventMode, {
|
||||
{EventMode::kEditMode, "kEditMode"},
|
||||
{EventMode::kMenuMode, "kMenuMode"},
|
||||
{EventMode::kEmulationMode, "kEmulationMode"},
|
||||
{EventMode::kJoystickMode, "kJoystickMode"},
|
||||
{EventMode::kPaddlesMode, "kPaddlesMode"},
|
||||
{EventMode::kKeypadMode, "kKeypadMode"},
|
||||
{EventMode::kCompuMateMode, "kCompuMateMode"},
|
||||
{EventMode::kCommonMode, "kCommonMode"},
|
||||
{EventMode::kNumModes, "kNumModes"},
|
||||
});
|
||||
|
||||
NLOHMANN_JSON_SERIALIZE_ENUM(Event::Type, {
|
||||
{Event::NoType, "NoType"},
|
||||
{Event::ConsoleColor, "ConsoleColor"},
|
||||
{Event::ConsoleBlackWhite, "ConsoleBlackWhite"},
|
||||
{Event::ConsoleColorToggle, "ConsoleColorToggle"},
|
||||
{Event::Console7800Pause, "Console7800Pause"},
|
||||
{Event::ConsoleLeftDiffA, "ConsoleLeftDiffA"},
|
||||
{Event::ConsoleLeftDiffB, "ConsoleLeftDiffB"},
|
||||
{Event::ConsoleLeftDiffToggle, "ConsoleLeftDiffToggle"},
|
||||
{Event::ConsoleRightDiffA, "ConsoleRightDiffA"},
|
||||
{Event::ConsoleRightDiffB, "ConsoleRightDiffB"},
|
||||
{Event::ConsoleRightDiffToggle, "ConsoleRightDiffToggle"},
|
||||
{Event::ConsoleSelect, "ConsoleSelect"},
|
||||
{Event::ConsoleReset, "ConsoleReset"},
|
||||
{Event::JoystickZeroUp, "JoystickZeroUp"},
|
||||
{Event::JoystickZeroDown, "JoystickZeroDown"},
|
||||
{Event::JoystickZeroLeft, "JoystickZeroLeft"},
|
||||
{Event::JoystickZeroRight, "JoystickZeroRight"},
|
||||
{Event::JoystickZeroFire, "JoystickZeroFire"},
|
||||
{Event::JoystickZeroFire5, "JoystickZeroFire5"},
|
||||
{Event::JoystickZeroFire9, "JoystickZeroFire9"},
|
||||
{Event::JoystickOneUp, "JoystickOneUp"},
|
||||
{Event::JoystickOneDown, "JoystickOneDown"},
|
||||
{Event::JoystickOneLeft, "JoystickOneLeft"},
|
||||
{Event::JoystickOneRight, "JoystickOneRight"},
|
||||
{Event::JoystickOneFire, "JoystickOneFire"},
|
||||
{Event::JoystickOneFire5, "JoystickOneFire5"},
|
||||
{Event::JoystickOneFire9, "JoystickOneFire9"},
|
||||
{Event::PaddleZeroDecrease, "PaddleZeroDecrease"},
|
||||
{Event::PaddleZeroIncrease, "PaddleZeroIncrease"},
|
||||
{Event::PaddleZeroAnalog, "PaddleZeroAnalog"},
|
||||
{Event::PaddleZeroFire, "PaddleZeroFire"},
|
||||
{Event::PaddleOneDecrease, "PaddleOneDecrease"},
|
||||
{Event::PaddleOneIncrease, "PaddleOneIncrease"},
|
||||
{Event::PaddleOneAnalog, "PaddleOneAnalog"},
|
||||
{Event::PaddleOneFire, "PaddleOneFire"},
|
||||
{Event::PaddleTwoDecrease, "PaddleTwoDecrease"},
|
||||
{Event::PaddleTwoIncrease, "PaddleTwoIncrease"},
|
||||
{Event::PaddleTwoAnalog, "PaddleTwoAnalog"},
|
||||
{Event::PaddleTwoFire, "PaddleTwoFire"},
|
||||
{Event::PaddleThreeDecrease, "PaddleThreeDecrease"},
|
||||
{Event::PaddleThreeIncrease, "PaddleThreeIncrease"},
|
||||
{Event::PaddleThreeAnalog, "PaddleThreeAnalog"},
|
||||
{Event::PaddleThreeFire, "PaddleThreeFire"},
|
||||
{Event::KeyboardZero1, "KeyboardZero1"},
|
||||
{Event::KeyboardZero2, "KeyboardZero2"},
|
||||
{Event::KeyboardZero3, "KeyboardZero3"},
|
||||
{Event::KeyboardZero4, "KeyboardZero4"},
|
||||
{Event::KeyboardZero5, "KeyboardZero5"},
|
||||
{Event::KeyboardZero6, "KeyboardZero6"},
|
||||
{Event::KeyboardZero7, "KeyboardZero7"},
|
||||
{Event::KeyboardZero8, "KeyboardZero8"},
|
||||
{Event::KeyboardZero9, "KeyboardZero9"},
|
||||
{Event::KeyboardZeroStar, "KeyboardZeroStar"},
|
||||
{Event::KeyboardZero0, "KeyboardZero0"},
|
||||
{Event::KeyboardZeroPound, "KeyboardZeroPound"},
|
||||
{Event::KeyboardOne1, "KeyboardOne1"},
|
||||
{Event::KeyboardOne2, "KeyboardOne2"},
|
||||
{Event::KeyboardOne3, "KeyboardOne3"},
|
||||
{Event::KeyboardOne4, "KeyboardOne4"},
|
||||
{Event::KeyboardOne5, "KeyboardOne5"},
|
||||
{Event::KeyboardOne6, "KeyboardOne6"},
|
||||
{Event::KeyboardOne7, "KeyboardOne7"},
|
||||
{Event::KeyboardOne8, "KeyboardOne8"},
|
||||
{Event::KeyboardOne9, "KeyboardOne9"},
|
||||
{Event::KeyboardOneStar, "KeyboardOneStar"},
|
||||
{Event::KeyboardOne0, "KeyboardOne0"},
|
||||
{Event::KeyboardOnePound, "KeyboardOnePound"},
|
||||
{Event::CompuMateFunc, "CompuMateFunc"},
|
||||
{Event::CompuMateShift, "CompuMateShift"},
|
||||
{Event::CompuMate0, "CompuMate0"},
|
||||
{Event::CompuMate1, "CompuMate1"},
|
||||
{Event::CompuMate2, "CompuMate2"},
|
||||
{Event::CompuMate3, "CompuMate3"},
|
||||
{Event::CompuMate4, "CompuMate4"},
|
||||
{Event::CompuMate5, "CompuMate5"},
|
||||
{Event::CompuMate6, "CompuMate6"},
|
||||
{Event::CompuMate7, "CompuMate7"},
|
||||
{Event::CompuMate8, "CompuMate8"},
|
||||
{Event::CompuMate9, "CompuMate9"},
|
||||
{Event::CompuMateA, "CompuMateA"},
|
||||
{Event::CompuMateB, "CompuMateB"},
|
||||
{Event::CompuMateC, "CompuMateC"},
|
||||
{Event::CompuMateD, "CompuMateD"},
|
||||
{Event::CompuMateE, "CompuMateE"},
|
||||
{Event::CompuMateF, "CompuMateF"},
|
||||
{Event::CompuMateG, "CompuMateG"},
|
||||
{Event::CompuMateH, "CompuMateH"},
|
||||
{Event::CompuMateI, "CompuMateI"},
|
||||
{Event::CompuMateJ, "CompuMateJ"},
|
||||
{Event::CompuMateK, "CompuMateK"},
|
||||
{Event::CompuMateL, "CompuMateL"},
|
||||
{Event::CompuMateM, "CompuMateM"},
|
||||
{Event::CompuMateN, "CompuMateN"},
|
||||
{Event::CompuMateO, "CompuMateO"},
|
||||
{Event::CompuMateP, "CompuMateP"},
|
||||
{Event::CompuMateQ, "CompuMateQ"},
|
||||
{Event::CompuMateR, "CompuMateR"},
|
||||
{Event::CompuMateS, "CompuMateS"},
|
||||
{Event::CompuMateT, "CompuMateT"},
|
||||
{Event::CompuMateU, "CompuMateU"},
|
||||
{Event::CompuMateV, "CompuMateV"},
|
||||
{Event::CompuMateW, "CompuMateW"},
|
||||
{Event::CompuMateX, "CompuMateX"},
|
||||
{Event::CompuMateY, "CompuMateY"},
|
||||
{Event::CompuMateZ, "CompuMateZ"},
|
||||
{Event::CompuMateComma, "CompuMateComma"},
|
||||
{Event::CompuMatePeriod, "CompuMatePeriod"},
|
||||
{Event::CompuMateEnter, "CompuMateEnter"},
|
||||
{Event::CompuMateSpace, "CompuMateSpace"},
|
||||
{Event::CompuMateQuestion, "CompuMateQuestion"},
|
||||
{Event::CompuMateLeftBracket, "CompuMateLeftBracket"},
|
||||
{Event::CompuMateRightBracket, "CompuMateRightBracket"},
|
||||
{Event::CompuMateMinus, "CompuMateMinus"},
|
||||
{Event::CompuMateQuote, "CompuMateQuote"},
|
||||
{Event::CompuMateBackspace, "CompuMateBackspace"},
|
||||
{Event::CompuMateEquals, "CompuMateEquals"},
|
||||
{Event::CompuMatePlus, "CompuMatePlus"},
|
||||
{Event::CompuMateSlash, "CompuMateSlash"},
|
||||
{Event::Combo1, "Combo1"},
|
||||
{Event::Combo2, "Combo2"},
|
||||
{Event::Combo3, "Combo3"},
|
||||
{Event::Combo4, "Combo4"},
|
||||
{Event::Combo5, "Combo5"},
|
||||
{Event::Combo6, "Combo6"},
|
||||
{Event::Combo7, "Combo7"},
|
||||
{Event::Combo8, "Combo8"},
|
||||
{Event::Combo9, "Combo9"},
|
||||
{Event::Combo10, "Combo10"},
|
||||
{Event::Combo11, "Combo11"},
|
||||
{Event::Combo12, "Combo12"},
|
||||
{Event::Combo13, "Combo13"},
|
||||
{Event::Combo14, "Combo14"},
|
||||
{Event::Combo15, "Combo15"},
|
||||
{Event::Combo16, "Combo16"},
|
||||
{Event::UIUp, "UIUp"},
|
||||
{Event::UIDown, "UIDown"},
|
||||
{Event::UILeft, "UILeft"},
|
||||
{Event::UIRight, "UIRight"},
|
||||
{Event::UIHome, "UIHome"},
|
||||
{Event::UIEnd, "UIEnd"},
|
||||
{Event::UIPgUp, "UIPgUp"},
|
||||
{Event::UIPgDown, "UIPgDown"},
|
||||
{Event::UISelect, "UISelect"},
|
||||
{Event::UINavPrev, "UINavPrev"},
|
||||
{Event::UINavNext, "UINavNext"},
|
||||
{Event::UIOK, "UIOK"},
|
||||
{Event::UICancel, "UICancel"},
|
||||
{Event::UIPrevDir, "UIPrevDir"},
|
||||
{Event::UITabPrev, "UITabPrev"},
|
||||
{Event::UITabNext, "UITabNext"},
|
||||
{Event::HandleMouseControl, "HandleMouseControl"},
|
||||
{Event::ToggleGrabMouse, "ToggleGrabMouse"},
|
||||
{Event::MouseAxisXMove, "MouseAxisXMove"},
|
||||
{Event::MouseAxisYMove, "MouseAxisYMove"},
|
||||
{Event::MouseAxisXValue, "MouseAxisXValue"},
|
||||
{Event::MouseAxisYValue, "MouseAxisYValue"},
|
||||
{Event::MouseButtonLeftValue, "MouseButtonLeftValue"},
|
||||
{Event::MouseButtonRightValue, "MouseButtonRightValue"},
|
||||
{Event::Quit, "Quit"},
|
||||
{Event::ReloadConsole, "ReloadConsole"},
|
||||
{Event::Fry, "Fry"},
|
||||
{Event::TogglePauseMode, "TogglePauseMode"},
|
||||
{Event::StartPauseMode, "StartPauseMode"},
|
||||
{Event::OptionsMenuMode, "OptionsMenuMode"},
|
||||
{Event::CmdMenuMode, "CmdMenuMode"},
|
||||
{Event::DebuggerMode, "DebuggerMode"},
|
||||
{Event::ExitMode, "ExitMode"},
|
||||
{Event::TakeSnapshot, "TakeSnapshot"},
|
||||
{Event::ToggleContSnapshots, "ToggleContSnapshots"},
|
||||
{Event::ToggleContSnapshotsFrame, "ToggleContSnapshotsFrame"},
|
||||
{Event::ToggleTurbo, "ToggleTurbo"},
|
||||
{Event::NextState, "NextState"},
|
||||
{Event::PreviousState, "PreviousState"},
|
||||
{Event::LoadState, "LoadState"},
|
||||
{Event::SaveState, "SaveState"},
|
||||
{Event::SaveAllStates, "SaveAllStates"},
|
||||
{Event::LoadAllStates, "LoadAllStates"},
|
||||
{Event::ToggleAutoSlot, "ToggleAutoSlot"},
|
||||
{Event::ToggleTimeMachine, "ToggleTimeMachine"},
|
||||
{Event::TimeMachineMode, "TimeMachineMode"},
|
||||
{Event::Rewind1Menu, "Rewind1Menu"},
|
||||
{Event::Rewind10Menu, "Rewind10Menu"},
|
||||
{Event::RewindAllMenu, "RewindAllMenu"},
|
||||
{Event::Unwind1Menu, "Unwind1Menu"},
|
||||
{Event::Unwind10Menu, "Unwind10Menu"},
|
||||
{Event::UnwindAllMenu, "UnwindAllMenu"},
|
||||
{Event::RewindPause, "RewindPause"},
|
||||
{Event::UnwindPause, "UnwindPause"},
|
||||
{Event::FormatDecrease, "FormatDecrease"},
|
||||
{Event::FormatIncrease, "FormatIncrease"},
|
||||
{Event::PaletteDecrease, "PaletteDecrease"},
|
||||
{Event::PaletteIncrease, "PaletteIncrease"},
|
||||
{Event::ToggleColorLoss, "ToggleColorLoss"},
|
||||
{Event::PreviousPaletteAttribute, "PreviousPaletteAttribute"},
|
||||
{Event::NextPaletteAttribute, "NextPaletteAttribute"},
|
||||
{Event::PaletteAttributeDecrease, "PaletteAttributeDecrease"},
|
||||
{Event::PaletteAttributeIncrease, "PaletteAttributeIncrease"},
|
||||
{Event::ToggleFullScreen, "ToggleFullScreen"},
|
||||
{Event::VidmodeDecrease, "VidmodeDecrease"},
|
||||
{Event::VidmodeIncrease, "VidmodeIncrease"},
|
||||
{Event::VCenterDecrease, "VCenterDecrease"},
|
||||
{Event::VCenterIncrease, "VCenterIncrease"},
|
||||
{Event::VSizeAdjustDecrease, "VSizeAdjustDecrease"},
|
||||
{Event::VSizeAdjustIncrease, "VSizeAdjustIncrease"},
|
||||
{Event::OverscanDecrease, "OverscanDecrease"},
|
||||
{Event::OverscanIncrease, "OverscanIncrease"},
|
||||
{Event::VidmodeStd, "VidmodeStd"},
|
||||
{Event::VidmodeRGB, "VidmodeRGB"},
|
||||
{Event::VidmodeSVideo, "VidmodeSVideo"},
|
||||
{Event::VidModeComposite, "VidModeComposite"},
|
||||
{Event::VidModeBad, "VidModeBad"},
|
||||
{Event::VidModeCustom, "VidModeCustom"},
|
||||
{Event::PreviousVideoMode, "PreviousVideoMode"},
|
||||
{Event::NextVideoMode, "NextVideoMode"},
|
||||
{Event::PreviousAttribute, "PreviousAttribute"},
|
||||
{Event::NextAttribute, "NextAttribute"},
|
||||
{Event::DecreaseAttribute, "DecreaseAttribute"},
|
||||
{Event::IncreaseAttribute, "IncreaseAttribute"},
|
||||
{Event::ScanlinesDecrease, "ScanlinesDecrease"},
|
||||
{Event::ScanlinesIncrease, "ScanlinesIncrease"},
|
||||
{Event::PhosphorDecrease, "PhosphorDecrease"},
|
||||
{Event::PhosphorIncrease, "PhosphorIncrease"},
|
||||
{Event::TogglePhosphor, "TogglePhosphor"},
|
||||
{Event::ToggleInter, "ToggleInter"},
|
||||
{Event::ToggleJitter, "ToggleJitter"},
|
||||
{Event::VolumeDecrease, "VolumeDecrease"},
|
||||
{Event::VolumeIncrease, "VolumeIncrease"},
|
||||
{Event::SoundToggle, "SoundToggle"},
|
||||
{Event::ToggleP0Collision, "ToggleP0Collision"},
|
||||
{Event::ToggleP0Bit, "ToggleP0Bit"},
|
||||
{Event::ToggleP1Collision, "ToggleP1Collision"},
|
||||
{Event::ToggleP1Bit, "ToggleP1Bit"},
|
||||
{Event::ToggleM0Collision, "ToggleM0Collision"},
|
||||
{Event::ToggleM0Bit, "ToggleM0Bit"},
|
||||
{Event::ToggleM1Collision, "ToggleM1Collision"},
|
||||
{Event::ToggleM1Bit, "ToggleM1Bit"},
|
||||
{Event::ToggleBLCollision, "ToggleBLCollision"},
|
||||
{Event::ToggleBLBit, "ToggleBLBit"},
|
||||
{Event::TogglePFCollision, "TogglePFCollision"},
|
||||
{Event::TogglePFBit, "TogglePFBit"},
|
||||
{Event::ToggleCollisions, "ToggleCollisions"},
|
||||
{Event::ToggleBits, "ToggleBits"},
|
||||
{Event::ToggleFixedColors, "ToggleFixedColors"},
|
||||
{Event::ToggleFrameStats, "ToggleFrameStats"},
|
||||
{Event::ToggleSAPortOrder, "ToggleSAPortOrder"},
|
||||
{Event::ExitGame, "ExitGame"},
|
||||
{Event::SettingDecrease, "SettingDecrease"},
|
||||
{Event::SettingIncrease, "SettingIncrease"},
|
||||
{Event::PreviousSetting, "PreviousSetting"},
|
||||
{Event::NextSetting, "NextSetting"},
|
||||
{Event::ToggleAdaptRefresh, "ToggleAdaptRefresh"},
|
||||
{Event::PreviousMultiCartRom, "PreviousMultiCartRom"},
|
||||
{Event::PreviousSettingGroup, "PreviousSettingGroup"},
|
||||
{Event::NextSettingGroup, "NextSettingGroup"},
|
||||
{Event::TogglePlayBackMode, "TogglePlayBackMode"},
|
||||
{Event::DecreaseAutoFire, "DecreaseAutoFire"},
|
||||
{Event::IncreaseAutoFire, "IncreaseAutoFire"},
|
||||
{Event::DecreaseSpeed, "DecreaseSpeed"},
|
||||
{Event::IncreaseSpeed, "IncreaseSpeed"},
|
||||
{Event::JoystickTwoUp, "JoystickTwoUp"},
|
||||
{Event::JoystickTwoDown, "JoystickTwoDown"},
|
||||
{Event::JoystickTwoLeft, "JoystickTwoLeft"},
|
||||
{Event::JoystickTwoRight, "JoystickTwoRight"},
|
||||
{Event::JoystickTwoFire, "JoystickTwoFire"},
|
||||
{Event::JoystickThreeUp, "JoystickThreeUp"},
|
||||
{Event::JoystickThreeDown, "JoystickThreeDown"},
|
||||
{Event::JoystickThreeLeft, "JoystickThreeLeft"},
|
||||
{Event::JoystickThreeRight, "JoystickThreeRight"},
|
||||
{Event::JoystickThreeFire, "JoystickThreeFire"},
|
||||
{Event::ToggleCorrectAspectRatio, "ToggleCorrectAspectRatio"},
|
||||
{Event::MoveLeftChar, "MoveLeftChar"},
|
||||
{Event::MoveRightChar, "MoveRightChar"},
|
||||
{Event::MoveLeftWord, "MoveLeftWord"},
|
||||
{Event::MoveRightWord, "MoveRightWord"},
|
||||
{Event::MoveHome, "MoveHome"},
|
||||
{Event::MoveEnd, "MoveEnd"},
|
||||
{Event::SelectLeftChar, "SelectLeftChar"},
|
||||
{Event::SelectRightChar, "SelectRightChar"},
|
||||
{Event::SelectLeftWord, "SelectLeftWord"},
|
||||
{Event::SelectRightWord, "SelectRightWord"},
|
||||
{Event::SelectHome, "SelectHome"},
|
||||
{Event::SelectEnd, "SelectEnd"},
|
||||
{Event::SelectAll, "SelectAll"},
|
||||
{Event::Delete, "Delete"},
|
||||
{Event::DeleteLeftWord, "DeleteLeftWord"},
|
||||
{Event::DeleteRightWord, "DeleteRightWord"},
|
||||
{Event::DeleteHome, "DeleteHome"},
|
||||
{Event::DeleteEnd, "DeleteEnd"},
|
||||
{Event::Backspace, "Backspace"},
|
||||
{Event::Cut, "Cut"},
|
||||
{Event::Copy, "Copy"},
|
||||
{Event::Paste, "Paste"},
|
||||
{Event::Undo, "Undo"},
|
||||
{Event::Redo, "Redo"},
|
||||
{Event::AbortEdit, "AbortEdit"},
|
||||
{Event::EndEdit, "EndEdit"},
|
||||
{Event::LastType, "LastType"}
|
||||
});
|
||||
|
||||
#endif // JSON_DEFINITIONS_HXX
|
Loading…
Reference in New Issue