mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-11 12:05:09 -05:00
68e7f2e6c1
* Wii U support * [WiiU] Combined Dockerfile * [WiiU] Combined Dockerfile * [WiiU] Combined Dockerfile * Add Jenkins support * wiiu: fix scissor clamp * wiiu: improve button remapping * wiiu: fix scaling issues * Update Dockerfile after merge * Pull assets before build * Only stop container once * Adjust logging sinks * wiiu: Change button mapping to match PC version * wiiu: Implement controller changes * wiiu: Update BUILDING.md Co-authored-by: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com> Co-authored-by: David Chavez <david@dcvz.io>
39 lines
1.2 KiB
C++
39 lines
1.2 KiB
C++
#pragma once
|
|
#include "Controller.h"
|
|
#include <string>
|
|
|
|
#include <padscore/wpad.h>
|
|
|
|
namespace Ship {
|
|
class WiiUController : public Controller {
|
|
public:
|
|
WiiUController(WPADChan chan);
|
|
bool Open();
|
|
void Close();
|
|
|
|
void ReadFromSource(int32_t virtualSlot) override;
|
|
void WriteToSource(int32_t virtualSlot, ControllerCallback* controller) override;
|
|
bool Connected() const override { return connected; };
|
|
bool CanGyro() const override { return false; }
|
|
bool CanRumble() const override { return true; };
|
|
|
|
void ClearRawPress() override;
|
|
int32_t ReadRawPress() override;
|
|
|
|
const std::string GetButtonName(int32_t virtualSlot, int n64Button) override;
|
|
const std::string GetControllerName() override;
|
|
|
|
protected:
|
|
void NormalizeStickAxis(int32_t virtualSlot, float x, float y, uint16_t threshold, bool isRightStick);
|
|
void CreateDefaultBinding(int32_t virtualSlot) override;
|
|
|
|
private:
|
|
std::string GetControllerExtensionName();
|
|
std::string controllerName;
|
|
|
|
bool connected;
|
|
WPADChan chan;
|
|
WPADExtensionType extensionType;
|
|
};
|
|
}
|