Skip to content

Commit

Permalink
Some debugging code.
Browse files Browse the repository at this point in the history
GetAction aborts on failure
HandleDigitalActionBool prints the name of the failing action.
  • Loading branch information
kitlith committed Jun 19, 2024
1 parent 911e63c commit 6bdd4c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ VRActionHandle_t GetAction(const char* action_path) {
EVRInputError error = (EVRInputError)VRInput()->GetActionHandle(action_path, &handle);
if (error != VRInputError_None) {
fmt::print("Error: Unable to get action handle '{}': {}", action_path, error);
// consider exiting?
std::exit(1);
}

return handle;
Expand Down Expand Up @@ -602,7 +602,7 @@ class Trackers {

return action_data;
} else {
fmt::print("Error: VRInput::GetDigitalActionData: {}\n", input_error);
fmt::print("Error: VRInput::GetDigitalActionData(\"{}\"): {}\n", server_name, input_error);
return {};
}
}
Expand Down

0 comments on commit 6bdd4c2

Please sign in to comment.