Skip to content

Commit 3bcc951

Browse files
committed
Cleanup ControlDeck class
1 parent 15fba97 commit 3bcc951

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

libultraship/libultraship/ControlDeck.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include "Cvar.h"
1010

1111
namespace Ship {
12-
uint8_t* controllerBits;
1312

1413
void ControlDeck::Init(uint8_t* bits) {
1514
ScanPhysicalDevices();
@@ -187,4 +186,9 @@ namespace Ship {
187186
std::shared_ptr<Controller> ControlDeck::GetPhysicalDeviceFromVirtualSlot(int slot) {
188187
return GetPhysicalDevice(GetVirtualDevice(slot));
189188
}
189+
190+
uint8_t* ControlDeck::GetControllerBits() {
191+
return controllerBits;
192+
}
193+
190194
}

libultraship/libultraship/ControlDeck.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ namespace Ship {
1818
size_t GetNumPhysicalDevices();
1919
int GetVirtualDevice(int slot);
2020
size_t GetNumVirtualDevices();
21+
uint8_t* GetControllerBits();
2122
private:
22-
std::vector<int> virtualDevices;
23+
std::vector<int> virtualDevices = {};
2324
std::vector<std::shared_ptr<Controller>> physicalDevices = {};
25+
uint8_t* controllerBits = nullptr;
2426
};
2527
}

0 commit comments

Comments
 (0)