5.6.2 (#612)
* add nlhomann json header * add get scene app fn * add get current binding and related logic * add save binding file to settings folder * apply binding fn added fixed uid bug * add button logic to QML, add enable Bind Setting * add finding logic for all custom bind * fix minor qml issues * fix get controllername bug, fix bug with save bind * fix regex issue * change webrequest for selectconfig * change to properly urlify path to send * fix race condition web requests * change steamvr tab qml formatting * change color scheme * change colors of icons to text color * change bind qml better for better ux * add possible workaround for space drag issues * add deact color to pushbutton * increment version * adjust button size in movecenter * move nlhomann json * fix PKGBUILD to include missing dependency (#606) (#613) It turns out qt5-websockets needs to be included for a successful build. Co-authored-by: James R <71466513+ColdIce1605@users.noreply.github.com> * fix warning * improved logging messages around perapp bindings * improve getsceneappID logging * add HMD based controller Finding * improve logging controller name * change logging around initial chaperone calibration * increment version * improve logging/error handling around sceneappid failures * added fallback for getting scene app by pid * update version string * update documentation Co-authored-by: James R <71466513+ColdIce1605@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
#include "ovr_application_wrapper.h"
|
||||
constexpr uint32_t bufferLen = 4096;
|
||||
namespace ovr_application_wrapper
|
||||
{
|
||||
std::string getSceneAppID()
|
||||
{
|
||||
uint32_t pidScene = vr::VRApplications()->GetCurrentSceneProcessId();
|
||||
char key[bufferLen];
|
||||
vr::EVRApplicationError error
|
||||
= vr::VRApplications()->GetApplicationKeyByProcessId(
|
||||
pidScene, key, bufferLen );
|
||||
std::string keys = key;
|
||||
if ( error != vr::VRApplicationError_None )
|
||||
{
|
||||
LOG( WARNING ) << "Could not Get App ID by PID: "
|
||||
+ std::to_string( error );
|
||||
LOG( WARNING ) << "Attempting to find through Enumeration";
|
||||
auto appCount = vr::VRApplications()->GetApplicationCount();
|
||||
const uint32_t bufferMax = vr::k_unMaxApplicationKeyLength;
|
||||
char cStringOut[bufferMax];
|
||||
for ( uint32_t i = 0; i < appCount; i++ )
|
||||
{
|
||||
auto error2 = vr::VRApplications()->GetApplicationKeyByIndex(
|
||||
i, cStringOut, bufferMax );
|
||||
std::string appID( cStringOut );
|
||||
if ( appID.find( "steam.app" ) != std::string::npos )
|
||||
{
|
||||
LOG( WARNING ) << "Found App ID through Enumeration (only "
|
||||
"steam apps caught): "
|
||||
<< appID;
|
||||
if ( error2 == vr::VRApplicationError_None )
|
||||
{
|
||||
return appID;
|
||||
}
|
||||
LOG( WARNING ) << "Error getting app id via Enum: " << error2;
|
||||
}
|
||||
}
|
||||
LOG( ERROR ) << "Unable to Find App ID by PID or by Enumeration";
|
||||
return "error";
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
} // namespace ovr_application_wrapper
|
||||
Reference in New Issue
Block a user