mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-26 19:32:17 -05:00
Cleanup ControlDeck class
This commit is contained in:
parent
15fba97949
commit
3bcc9514ab
@ -9,7 +9,6 @@
|
|||||||
#include "Cvar.h"
|
#include "Cvar.h"
|
||||||
|
|
||||||
namespace Ship {
|
namespace Ship {
|
||||||
uint8_t* controllerBits;
|
|
||||||
|
|
||||||
void ControlDeck::Init(uint8_t* bits) {
|
void ControlDeck::Init(uint8_t* bits) {
|
||||||
ScanPhysicalDevices();
|
ScanPhysicalDevices();
|
||||||
@ -187,4 +186,9 @@ namespace Ship {
|
|||||||
std::shared_ptr<Controller> ControlDeck::GetPhysicalDeviceFromVirtualSlot(int slot) {
|
std::shared_ptr<Controller> ControlDeck::GetPhysicalDeviceFromVirtualSlot(int slot) {
|
||||||
return GetPhysicalDevice(GetVirtualDevice(slot));
|
return GetPhysicalDevice(GetVirtualDevice(slot));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint8_t* ControlDeck::GetControllerBits() {
|
||||||
|
return controllerBits;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -18,8 +18,10 @@ namespace Ship {
|
|||||||
size_t GetNumPhysicalDevices();
|
size_t GetNumPhysicalDevices();
|
||||||
int GetVirtualDevice(int slot);
|
int GetVirtualDevice(int slot);
|
||||||
size_t GetNumVirtualDevices();
|
size_t GetNumVirtualDevices();
|
||||||
|
uint8_t* GetControllerBits();
|
||||||
private:
|
private:
|
||||||
std::vector<int> virtualDevices;
|
std::vector<int> virtualDevices = {};
|
||||||
std::vector<std::shared_ptr<Controller>> physicalDevices = {};
|
std::vector<std::shared_ptr<Controller>> physicalDevices = {};
|
||||||
|
uint8_t* controllerBits = nullptr;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user