Cleanup ControlDeck class

This commit is contained in:
Kenix3 2022-08-10 18:29:14 -04:00
parent 15fba97949
commit 3bcc9514ab
2 changed files with 8 additions and 2 deletions

View File

@ -9,7 +9,6 @@
#include "Cvar.h"
namespace Ship {
uint8_t* controllerBits;
void ControlDeck::Init(uint8_t* bits) {
ScanPhysicalDevices();
@ -187,4 +186,9 @@ namespace Ship {
std::shared_ptr<Controller> ControlDeck::GetPhysicalDeviceFromVirtualSlot(int slot) {
return GetPhysicalDevice(GetVirtualDevice(slot));
}
uint8_t* ControlDeck::GetControllerBits() {
return controllerBits;
}
}

View File

@ -18,8 +18,10 @@ namespace Ship {
size_t GetNumPhysicalDevices();
int GetVirtualDevice(int slot);
size_t GetNumVirtualDevices();
uint8_t* GetControllerBits();
private:
std::vector<int> virtualDevices;
std::vector<int> virtualDevices = {};
std::vector<std::shared_ptr<Controller>> physicalDevices = {};
uint8_t* controllerBits = nullptr;
};
}