openMSX
input
JoystickId.hh
Go to the documentation of this file.
1
#ifndef JOYSTICK_ID_HH
2
#define JOYSTICK_ID_HH
3
4
#include "
strCat.hh
"
5
6
namespace
openmsx
{
7
8
// openMSX specific joystick numbering,
9
// different from SDL joystick device index and
10
// different from SDL joystick instance ID.
11
class
JoystickId
{
12
public
:
13
explicit
JoystickId
(
unsigned
id_) : id(id_) {}
14
[[nodiscard]]
unsigned
raw
()
const
{
return
id; }
15
[[nodiscard]]
bool
operator==
(
const
JoystickId
&)
const
=
default
;
16
[[nodiscard]] std::string
str
()
const
{
return
strCat
(
"joy"
,
id
+ 1); }
17
18
private
:
19
unsigned
id;
20
};
21
22
}
// namespace openmsx
23
24
#endif
openmsx::JoystickId
Definition
JoystickId.hh:11
openmsx::JoystickId::str
std::string str() const
Definition
JoystickId.hh:16
openmsx::JoystickId::raw
unsigned raw() const
Definition
JoystickId.hh:14
openmsx::JoystickId::JoystickId
JoystickId(unsigned id_)
Definition
JoystickId.hh:13
openmsx::JoystickId::operator==
bool operator==(const JoystickId &) const =default
openmsx
This file implemented 3 utility functions:
Definition
Autofire.cc:11
strCat.hh
strCat
std::string strCat()
Definition
strCat.hh:703
Generated on Sat Oct 5 2024 20:13:57 for openMSX by
1.9.8