summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2013-04-04 19:42:16 -0500
committerJordan Woyak <jordan.woyak@gmail.com>2013-04-04 19:46:42 -0500
commitf8e52bd83a18240a7ae69747367b82fb4d43812f (patch)
treedd9005f6df49e21ce8c09c46b1c86b24fc265a25 /Source/Core
parent71f4bf25a763f1edc92c2ef7b21a687da1ae0afa (diff)
Eliminate some redundant constants.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp12
-rw-r--r--Source/Core/Core/Src/HW/WiimoteReal/WiimoteRealBase.h18
2 files changed, 8 insertions, 22 deletions
diff --git a/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp b/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp
index 5231b2d3f2..79c737fdc0 100644
--- a/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp
+++ b/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp
@@ -86,7 +86,7 @@ void Wiimote::QueueReport(u8 rpt_id, const void* _data, unsigned int size)
rpt[0] = WM_SET_REPORT | WM_BT_OUTPUT;
rpt[1] = rpt_id;
std::copy_n(data, size, rpt.begin() + 2);
- m_write_reports.Push(rpt);
+ m_write_reports.Push(std::move(rpt));
}
void Wiimote::DisableDataReporting()
@@ -163,13 +163,13 @@ void Wiimote::InterruptChannel(const u16 channel, const void* const _data, const
&& !SConfig::GetInstance().m_WiimoteEnableSpeaker)
{
// Translate speaker data reports into rumble reports.
- rpt[1] = WM_CMD_RUMBLE;
+ rpt[1] = WM_RUMBLE;
// Keep only the rumble bit.
rpt[2] &= 0x1;
rpt.resize(3);
}
- m_write_reports.Push(rpt);
+ m_write_reports.Push(std::move(rpt));
}
bool Wiimote::Read()
@@ -273,13 +273,13 @@ bool Wiimote::Prepare(int _index)
index = _index;
// core buttons, no continuous reporting
- u8 const mode_report[] = {WM_SET_REPORT | WM_BT_OUTPUT, WM_CMD_REPORT_TYPE, 0, 0x30};
+ u8 const mode_report[] = {WM_SET_REPORT | WM_BT_OUTPUT, WM_REPORT_MODE, 0, WM_REPORT_CORE};
// Set the active LEDs and turn on rumble.
- u8 const led_report[] = {WM_SET_REPORT | WM_BT_OUTPUT, WM_CMD_LED, u8(WIIMOTE_LED_1 << index | 0x1)};
+ u8 const led_report[] = {WM_SET_REPORT | WM_BT_OUTPUT, WM_LEDS, u8(WIIMOTE_LED_1 << index | 0x1)};
// Turn off rumble
- u8 rumble_report[] = {WM_SET_REPORT | WM_BT_OUTPUT, WM_CMD_RUMBLE, 0};
+ u8 rumble_report[] = {WM_SET_REPORT | WM_BT_OUTPUT, WM_RUMBLE, 0};
// Request status report
u8 const req_status_report[] = {WM_SET_REPORT | WM_BT_OUTPUT, WM_REQUEST_STATUS, 0};
diff --git a/Source/Core/Core/Src/HW/WiimoteReal/WiimoteRealBase.h b/Source/Core/Core/Src/HW/WiimoteReal/WiimoteRealBase.h
index 1a1f6676cf..e2b1a8db03 100644
--- a/Source/Core/Core/Src/HW/WiimoteReal/WiimoteRealBase.h
+++ b/Source/Core/Core/Src/HW/WiimoteReal/WiimoteRealBase.h
@@ -41,20 +41,6 @@
#define WM_SET_REPORT 0xA0
#endif
-// TODO: duplicated in WiimoteHid.h
-// Commands
-#define WM_CMD_RUMBLE 0x10
-#define WM_CMD_LED 0x11
-#define WM_CMD_REPORT_TYPE 0x12
-#define WM_CMD_IR 0x13
-#define WM_CMD_SPEAKER_ENABLE 0x14
-#define WM_CMD_CTRL_STATUS 0x15
-#define WM_CMD_WRITE_DATA 0x16
-#define WM_CMD_READ_DATA 0x17
-#define WM_CMD_SPEAKER_DATA 0x18
-#define WM_CMD_SPEAKER_MUTE 0x19
-#define WM_CMD_IR_2 0x1A
-
#define WM_BT_INPUT 0x01
#define WM_BT_OUTPUT 0x02
@@ -73,12 +59,12 @@
#ifdef _WIN32
// Available bluetooth stacks for Windows.
-typedef enum win_bt_stack_t
+enum win_bt_stack_t
{
MSBT_STACK_UNKNOWN,
MSBT_STACK_MS,
MSBT_STACK_BLUESOLEIL
-} win_bt_stack_t;
+};
#endif
#endif // WIIMOTE_COMM_H