Skip to content

Commit

Permalink
Remove no-longer-needed PointCtrlSource openxr constructor args
Browse files Browse the repository at this point in the history
refs #20
  • Loading branch information
fredemmott committed Jan 7, 2023
1 parent a4820a8 commit e6a0e0f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 26 deletions.
3 changes: 1 addition & 2 deletions src/APILayer/APILayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ APILayer::APILayer(
mHandTracking = std::make_unique<HandTrackingSource>(
next, instance, session, mViewSpace, mLocalSpace);
}
mPointCtrl = std::make_unique<PointCtrlSource>(
next, instance, session, mViewSpace, mLocalSpace);
mPointCtrl = std::make_unique<PointCtrlSource>();

if (
VirtualControllerSink::IsActionSink()
Expand Down
2 changes: 1 addition & 1 deletion src/PointCtrlCalibration/PointCtrlCalibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ int __stdcall wWinMain(HINSTANCE, HINSTANCE, PWSTR, int) {
}
const auto openXR
= std::make_shared<OpenXRNext>(instance, &xrGetInstanceProcAddr);
PointCtrlSource pointCtrl(openXR, instance, session, viewSpace, localSpace);
PointCtrlSource pointCtrl;
while (!pointCtrl.IsConnected()) {
const auto result = MessageBoxW(
NULL,
Expand Down
12 changes: 1 addition & 11 deletions src/lib/PointCtrlSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,7 @@ static bool IsPointerSource() {
|| Environment::IsPointCtrlCalibration;
}

PointCtrlSource::PointCtrlSource(
const std::shared_ptr<OpenXRNext>& next,
XrInstance instance,
XrSession session,
XrSpace viewSpace,
XrSpace localSpace)
: mInstance(instance),
mSession(session),
mViewSpace(viewSpace),
mLocalSpace(localSpace),
mOpenXR(next) {
PointCtrlSource::PointCtrlSource() {
DebugPrint(
"Initializing PointCtrlSource with calibration ({}, {}) delta ({}, {})",
Config::PointCtrlCenterX,
Expand Down
13 changes: 1 addition & 12 deletions src/lib/PointCtrlSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@ namespace HandTrackedCockpitClicking {
// firmware.
class PointCtrlSource final : public InputSource {
public:
PointCtrlSource(
const std::shared_ptr<OpenXRNext>& next,
XrInstance instance,
XrSession session,
XrSpace viewSpace,
XrSpace localSpace);
PointCtrlSource();

bool IsConnected() const;

Expand Down Expand Up @@ -118,12 +113,6 @@ class PointCtrlSource final : public InputSource {
RawValues mRaw {};
XrTime mLastMovedAt {};

XrInstance mInstance {};
XrSession mSession {};
XrSpace mViewSpace {};
XrSpace mLocalSpace {};
std::shared_ptr<OpenXRNext> mOpenXR;

void UpdatePose(const FrameInfo&, InputState* hand);
void UpdateWakeState(bool hasButtons, XrTime now, Hand* hand);
void MapActionsClassic(
Expand Down

0 comments on commit e6a0e0f

Please sign in to comment.