Skip to content

Commit

Permalink
Merge pull request #73 from elvissteinjr/application-manifest
Browse files Browse the repository at this point in the history
Add application manifest and capsule images + update default binding name/description
  • Loading branch information
sd805 authored Jan 21, 2023
2 parents aef386d + 46e5073 commit dcf9518
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 6 deletions.
4 changes: 2 additions & 2 deletions L4D2VR/SteamVRActionManifest/bindings_knuckles.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@
},
"category" : "steamvr_input",
"controller_type" : "knuckles",
"description" : "default l4d2vr bindings",
"name" : "default l4d2vr bindings",
"description" : "",
"name" : "Default Left 4 Dead 2 VR bindings for Index Controllers",
"options" : {},
"simulated_actions" : []
}
Expand Down
4 changes: 2 additions & 2 deletions L4D2VR/SteamVRActionManifest/bindings_oculus_touch.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@
},
"category" : "steamvr_input",
"controller_type" : "oculus_touch",
"description" : "default l4d2vr bindings",
"name" : "default l4d2vr bindings",
"description" : "",
"name" : "Default Left 4 Dead 2 VR bindings for Oculus Touch",
"options" : {},
"simulated_actions" : []
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@
},
"category" : "steamvr_input",
"controller_type" : "vive_cosmos_controller",
"description" : "default l4d2vr bindings",
"name" : "default l4d2vr bindings",
"description" : "",
"name" : "Default Left 4 Dead 2 VR bindings for Vive Cosmos Controllers",
"options" : {},
"simulated_actions" : []
}
Expand Down
Binary file added L4D2VR/l4d2vr_capsule_main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added L4D2VR/l4d2vr_portrait_main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions L4D2VR/manifest.vrmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"source" : "builtin",
"applications": [{
"app_key": "steam.app.550",

"launch_type": "url",
"url": "steam://launch/550/VR",
"action_manifest_path" : "SteamVRActionManifest/action_manifest.json",
"image_path" : "l4d2vr_capsule_main.png",

"strings": {
"en_us": {
"name": "Left 4 Dead 2 VR",
"description": "Left 4 Dead 2 VR Mod"
}
}
}]
}
11 changes: 11 additions & 0 deletions L4D2VR/vr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ VR::VR(Game *game)
m_Aspect = tanHalfFov[0] / tanHalfFov[1];
m_Fov = 2.0f * atan(tanHalfFov[0]) * 360 / (3.14159265358979323846 * 2);

InstallApplicationManifest("manifest.vrmanifest");
SetActionManifest("action_manifest.json");

std::thread configParser(&VR::WaitForConfigUpdate, this);
Expand Down Expand Up @@ -142,6 +143,16 @@ int VR::SetActionManifest(const char *fileName)
return 0;
}

void VR::InstallApplicationManifest(const char *fileName)
{
char currentDir[MAX_STR_LEN];
GetCurrentDirectory(MAX_STR_LEN, currentDir);
char path[MAX_STR_LEN];
sprintf_s(path, MAX_STR_LEN, "%s\\VR\\%s", currentDir, fileName);

vr::VRApplications()->AddApplicationManifest(path);
}

void VR::Update()
{
if (!m_IsInitialized || !m_Game->m_Initialized)
Expand Down
1 change: 1 addition & 0 deletions L4D2VR/vr.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ class VR
VR() {};
VR(Game *game);
int SetActionManifest(const char *fileName);
void InstallApplicationManifest(const char *fileName);
void Update();
void CreateVRTextures();
void SubmitVRTextures();
Expand Down

0 comments on commit dcf9518

Please sign in to comment.