2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-14 05:26:10 +00:00

Initial CDolphinController RE

This commit is contained in:
2022-03-19 21:19:43 -07:00
parent ec430567c3
commit a96fe24260
16 changed files with 293 additions and 13 deletions

View File

@@ -4,16 +4,13 @@
#include <atomic>
#include <mutex>
#include "Runtime/Input/InputTypes.hpp"
#include "Runtime/Input/CFinalInput.hpp"
#include "Runtime/Input/CKeyboardMouseController.hpp"
namespace metaforce {
class CArchitectureQueue;
enum class EIOPort { Zero, One, Two, Three };
enum class EMotorState { Stop, Rumble, StopHard };
class CInputGenerator /*: public boo::DeviceFinder*/ {
enum class EStatusChange { NoChange = 0, Connected = 1, Disconnected = 2 };
@@ -152,7 +149,7 @@ public:
// }
void SetMotorState(EIOPort port, EMotorState state);
void ControlAllMotors(const std::array<EMotorState, 4>& states) {
for (u32 i = 0; i <= size_t(EIOPort::Three); ++i ) {
for (u32 i = 0; i <= size_t(EIOPort::Player4); ++i ) {
SetMotorState(EIOPort(i), states[i]);
}
}