Skip to content
This repository was archived by the owner on May 9, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions SuperScreenShotterVR/MainController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class MainController
private bool _initComplete = false;
private bool _isHookedForScreenshots = false;
private string _currentAppId = "";
private string _currentAppName = "";
private ulong _notificationOverlayHandle = 0;
private Dictionary<uint, ScreenshotData> _screenshotQueue = new Dictionary<uint, ScreenshotData>();
private uint _lastScreenshotHandle = 0;
Expand Down Expand Up @@ -149,6 +150,7 @@ private void WorkerThread()
UpdateScreenshotHook();
PlayScreenshotSound(true);
_currentAppId = _ovr.GetRunningApplicationId();
_currentAppName = _ovr.GetApplicationPropertyString(_currentAppId, EVRApplicationProperty.Name_String);
AppUpdateAction.Invoke(_currentAppId);
// ToggleViewfinder(true); // DEBUG
UpdateTrackedDeviceIndex();
Expand Down Expand Up @@ -185,6 +187,7 @@ private void WorkerThread()

_notificationOverlayHandle = _ovr.InitNotificationOverlay("SuperScreenShotterVR");
_currentAppId = _ovr.GetRunningApplicationId();
_currentAppName = _ovr.GetApplicationPropertyString(_currentAppId, EVRApplicationProperty.Name_String);

// Events
_ovr.RegisterEvent(EVREventType.VREvent_RequestScreenshot, (data) => {
Expand Down Expand Up @@ -432,13 +435,22 @@ public void UpdateOutputFolder(bool createDirIfNeeded = false, string subfolder
{
var dir = _settings.Directory;
if (createDirIfNeeded && !Directory.Exists(dir)) Directory.CreateDirectory(dir);
if(_currentAppId != string.Empty)

if (_settings.OutputAppname && _currentAppName != string.Empty)
{
Debug.WriteLine($"Settings subfolder to: steam.app.{_currentAppName}");
dir = $"{dir}\\steam.app.{_currentAppName}";
if (subfolder != string.Empty) dir = $"{dir}\\{subfolder}";
if (createDirIfNeeded && !Directory.Exists(dir)) Directory.CreateDirectory(dir);
}
else if (_currentAppId != string.Empty)
{
Debug.WriteLine($"Settings subfolder to: {_currentAppId}");
dir = $"{dir}\\{_currentAppId}";
if (subfolder != string.Empty) dir = $"{dir}\\{subfolder}";
if (createDirIfNeeded && !Directory.Exists(dir)) Directory.CreateDirectory(dir);
} else
}
else
{
if (subfolder != string.Empty) dir = $"{dir}\\{subfolder}";
}
Expand Down
3 changes: 2 additions & 1 deletion SuperScreenShotterVR/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SuperScreenShotterVR"
mc:Ignorable="d"
Title="SuperScreenShotterVR" Height="500" Width="840" Icon="resources/logo.ico" StateChanged="Window_StateChanged">
Title="SuperScreenShotterVR" Height="520" Width="840" Icon="resources/logo.ico" StateChanged="Window_StateChanged">
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
Expand Down Expand Up @@ -83,6 +83,7 @@
</StackPanel>
<CheckBox x:Name="CheckBoxSubmitToSteam" Margin="5 0 5 5" Content="Submit screenshots to Steam screenshot library" Checked="CheckBox_SubmitToSteam_Checked" Unchecked="CheckBox_SubmitToSteam_Checked"/>
<CheckBox x:Name="CheckBoxSaveRightImage" Margin="5 0 5 5" Content="Also save an image for the right eye" Checked="CheckBox_SaveRightImage_Checked" Unchecked="CheckBox_SaveRightImage_Checked"/>
<CheckBox x:Name="CheckBoxOutputAppname" Margin="5 0 5 5" Content="Using application name instaed of appid for output folder" Checked="CheckBox_OutputAppname_Checked" Unchecked="CheckBox_OutputAppname_Checked"/>
<StackPanel Orientation="Horizontal">
<Label Content="Output folder:"/>
<Button x:Name="ButtonBrowseDirectory" Padding="4" Content="Browse..." Click="Button_BrowseDirectory_Click"/>
Expand Down
7 changes: 7 additions & 0 deletions SuperScreenShotterVR/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ private void InitSettings()
CheckBoxLockHorizon.IsChecked = _settings.LockHorizon;
CheckBoxIndicateDegrees.IsChecked = _settings.IndicateDegrees;
CheckBoxSaveRightImage.IsChecked = _settings.SaveRightImage;
CheckBoxOutputAppname.IsChecked = _settings.OutputAppname;
CheckBoxCaptureTimer.IsChecked = _settings.CaptureTimer;
TextBoxTimerSeconds.Text = _settings.TimerSeconds.ToString();
CheckBoxDelayCapture.IsChecked = _settings.DelayCapture;
Expand Down Expand Up @@ -466,6 +467,12 @@ private void CheckBox_EnableHotkeys_Checked(object sender, RoutedEventArgs e)
UpdateHotkey(HotkeyIdViewfinder);
}

private void CheckBox_OutputAppname_Checked(object sender, RoutedEventArgs e)
{
_settings.OutputAppname = CheckboxValue(e);
_settings.Save();
}

private void CheckBox_ScreenshotHotkeyAlt_Checked(object sender, RoutedEventArgs e)
{
_settings.HotkeyScreenshotAlt = CheckboxValue(e);
Expand Down
13 changes: 13 additions & 0 deletions SuperScreenShotterVR/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading