OXYGENHUB
◆ main openmsx / src / input / MagicKey.cc
835 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
e8555c89 Andy McCall 1
#include "MagicKey.hh"
2
3
#include "serialize.hh"
4
#include "serialize_meta.hh"
5
6
namespace openmsx {
7
8
// Pluggable
9
zstring_view MagicKey::getName() const
10
{
11
	return "magic-key";
12
}
13
14
zstring_view MagicKey::getDescription() const
15
{
16
	return "Dongle used by some Japanese games to enable cheat mode";
17
}
18
19
void MagicKey::plugHelper(Connector& /*connector*/, EmuTime /*time*/)
20
{
21
}
22
23
void MagicKey::unplugHelper(EmuTime /*time*/)
24
{
25
}
26
27
28
// JoystickDevice
29
uint8_t MagicKey::read(EmuTime /*time*/)
30
{
31
	return JOY_BUTTONB | JOY_BUTTONA | JOY_RIGHT | JOY_LEFT;
32
}
33
34
void MagicKey::write(uint8_t /*value*/, EmuTime /*time*/)
35
{
36
}
37
38
39
template<typename Archive>
40
void MagicKey::serialize(Archive& /*ar*/, unsigned /*version*/)
41
{
42
}
43
INSTANTIATE_SERIALIZE_METHODS(MagicKey);
44
REGISTER_POLYMORPHIC_INITIALIZER(Pluggable, MagicKey, "MagicKey");
45
46
} // namespace openmsx