Skip to content

Commit 1a0d976

Browse files
committed
Add values for overlay texture size, input always active
Update version
1 parent edc63d6 commit 1a0d976

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

OpenVROverlayPipe/Input/InputDataOverlay.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ public class InputDataOverlay
1717
public bool IgnoreAnchorRoll = false;
1818

1919
public int OverlayChannel = 0;
20-
public string OverlayTitle = ""; // Used as reference when listing channels.
20+
public string OverlayTitle = ""; // Used as reference when listing channels, set once.
21+
public int OverlayWidth = 1024; // Texture size, set once.
22+
public int OverlayHeight = 1024;
2123
public int AnimationHz = -1;
2224
public int DurationMs = 5000;
2325
public bool Perpetual = false;
@@ -41,6 +43,7 @@ public class InputDataOverlay
4143

4244
public class InputObject
4345
{
46+
public bool AlwaysActive = false;
4447
public bool Mouse = false;
4548
public bool SmoothScroll = false;
4649
public bool DiscreteScroll = false;

OpenVROverlayPipe/Notification/Animator.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ public bool OnRender(double deltaTime)
6262
{
6363
if (_renderTexture == null)
6464
{
65-
// _texture = new Texture(_overlayHandle);
66-
_renderTexture = new RenderTexture(1024, 1024);
65+
// Create GL texture
66+
_renderTexture = new RenderTexture(_data?.OverlayWidth ?? 1024, _data?.OverlayHeight ?? 1024);
6767

6868
// Create SteamVR texture
6969
_vrTexture = new Texture_t
@@ -238,7 +238,7 @@ private void Worker() {
238238
OpenVR.Overlay.SetOverlayFlag(_overlayHandle, VROverlayFlags.SendVRDiscreteScrollEvents, properties.Input?.DiscreteScroll == true);
239239
OpenVR.Overlay.SetOverlayFlag(_overlayHandle, VROverlayFlags.SendVRSmoothScrollEvents, properties.Input?.SmoothScroll == true);
240240
OpenVR.Overlay.SetOverlayFlag(_overlayHandle, VROverlayFlags.SendVRTouchpadEvents, properties.Input?.Touchpad == true);
241-
OpenVR.Overlay.SetOverlayFlag(_overlayHandle, VROverlayFlags.MakeOverlaysInteractiveIfVisible, _isUsingInput);
241+
OpenVR.Overlay.SetOverlayFlag(_overlayHandle, VROverlayFlags.MakeOverlaysInteractiveIfVisible, properties.Input?.AlwaysActive == true);
242242
OpenVR.Overlay.SetOverlayFlag(_overlayHandle, VROverlayFlags.VisibleInDashboard, false);
243243

244244
// Set anchor
@@ -537,7 +537,9 @@ public void ProvideNewData(string sessionId, InputDataOverlay? data, string? non
537537
_nonce = nonce;
538538
}
539539

540-
public void Shutdown() {
540+
public void Shutdown()
541+
{
542+
OpenVR.Overlay.ClearOverlayTexture(_overlayHandle);
541543
_requestForNewData = null;
542544
_responseAtCompletion = null;
543545
_responseAtError = null;

OpenVROverlayPipe/Properties/Resources.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,6 @@
125125
<value>..\resources\logo.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
126126
</data>
127127
<data name="Version" xml:space="preserve">
128-
<value>v4.1.2</value>
128+
<value>v4.2.0</value>
129129
</data>
130130
</root>

0 commit comments

Comments
 (0)