mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2026-08-28 05:45:30 -05:00
Code cleanup
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "Input.h"
|
||||
class CombinedInput : public Input {
|
||||
class CombinedInput final : public Input {
|
||||
public:
|
||||
void combine(const Input &b) {
|
||||
data.buttons_d |= b.data.buttons_d;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
|
||||
class Input {
|
||||
public:
|
||||
@@ -11,7 +10,7 @@ public:
|
||||
//!Destructor
|
||||
virtual ~Input() = default;
|
||||
|
||||
enum eButtons {
|
||||
enum eButtons : uint32_t {
|
||||
BUTTON_NONE = 0x0000,
|
||||
VPAD_TOUCH = 0x80000000,
|
||||
BUTTON_STICK_L = 0x80000,
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "Input.h"
|
||||
#include <vpad/input.h>
|
||||
|
||||
class VPadInput : public Input {
|
||||
class VPadInput final : public Input {
|
||||
public:
|
||||
//!Constructor
|
||||
VPadInput() = default;
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
//!Destructor
|
||||
~VPadInput() override = default;
|
||||
|
||||
bool update(int32_t width, int32_t height) {
|
||||
bool update(const int32_t width, const int32_t height) {
|
||||
lastData = data;
|
||||
|
||||
data = {};
|
||||
|
||||
@@ -20,15 +20,15 @@
|
||||
#include <padscore/kpad.h>
|
||||
#include <padscore/wpad.h>
|
||||
|
||||
class WPADInput : public Input {
|
||||
class WPADInput final : public Input {
|
||||
public:
|
||||
WPADInput(KPADChan channel) {
|
||||
WPADInput(const KPADChan channel) {
|
||||
this->channel = channel;
|
||||
}
|
||||
|
||||
~WPADInput() override {}
|
||||
~WPADInput() override = default;
|
||||
|
||||
uint32_t remapWiiMoteButtons(uint32_t buttons) {
|
||||
uint32_t remapWiiMoteButtons(const uint32_t buttons) {
|
||||
uint32_t conv_buttons = 0;
|
||||
|
||||
if (buttons & WPAD_BUTTON_LEFT)
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
return conv_buttons;
|
||||
}
|
||||
|
||||
uint32_t remapClassicButtons(uint32_t buttons) {
|
||||
uint32_t remapClassicButtons(const uint32_t buttons) {
|
||||
uint32_t conv_buttons = 0;
|
||||
|
||||
if (buttons & WPAD_CLASSIC_BUTTON_LEFT)
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
return conv_buttons;
|
||||
}
|
||||
|
||||
bool update(int32_t width, int32_t height) {
|
||||
bool update(const int32_t width, const int32_t height) {
|
||||
lastData = data;
|
||||
|
||||
kpadError = KPAD_ERROR_UNINITIALIZED;
|
||||
|
||||
Reference in New Issue
Block a user