Skip to content

Commit

Permalink
update to allow other inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
UnseenFaith committed Jan 28, 2023
1 parent 74dc335 commit 22b7391
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
17 changes: 8 additions & 9 deletions PNGBuddy/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
using AutoUpdaterDotNET;
using MaterialDesignThemes.Wpf;
using Microsoft.VisualBasic;
using PNGBuddy.Messages;
using PNGBuddy.Messages;
using PNGBuddy.Messages.Hello;
using PNGBuddy.Types;
using System;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Net.WebSockets;
using System.Security.Cryptography;
using System.Text;
Expand All @@ -18,7 +13,6 @@
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Data;
using System.Windows.Forms;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Threading;
Expand Down Expand Up @@ -237,7 +231,7 @@ await Dispatcher.InvokeAsync(() =>
case "InputCreated":
{
var input = JsonSerializer.Deserialize<InputCreated>(ev.Data?.ToString()!);
if (input?.InputKind == "wasapi_input_capture")
if (input?.InputKind?.StartsWith("wasapi") == true)
{
await Dispatcher.InvokeAsync(() =>
{
Expand Down Expand Up @@ -282,7 +276,7 @@ await Dispatcher.InvokeAsync(() =>
{
case "GetInputList":
var inputs = JsonSerializer.Deserialize<Input>(res.Data?.ToString()!);
var audio = inputs?.Inputs?.Where(i => i.Kind == "wasapi_input_capture").ToList();
var audio = inputs?.Inputs?.Where(i => i.Kind!.StartsWith("wasapi")).ToList();

await Dispatcher.InvokeAsync(() =>
{
Expand Down Expand Up @@ -391,6 +385,11 @@ private void Idle_SourceUpdated(object sender, DataTransferEventArgs e)
IdleGrayScale.OpacityMask = new ImageBrush(bitmapImage);
}

private void Test()
{

}

private void Main_Loaded(object sender, RoutedEventArgs e)
{
Initialize();
Expand Down
2 changes: 1 addition & 1 deletion PNGBuddy/PNGBuddy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PlatformTarget>x64</PlatformTarget>
<SignAssembly>False</SignAssembly>
<IsPublishable>True</IsPublishable>
<AssemblyVersion>1.0.1.0</AssemblyVersion>
<AssemblyVersion>1.0.2.0</AssemblyVersion>
<Authors>UnseenFaith</Authors>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions version.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.0.1.0</version>
<url>https://github.com/UnseenFaith/PNGBuddy/releases/download/1.0.1/PNGBuddy.zip</url>
<version>1.0.2</version>
<url>https://github.com/UnseenFaith/PNGBuddy/releases/download/1.0.2/PNGBuddy.zip</url>
<mandatory>false</mandatory>
</item>

0 comments on commit 22b7391

Please sign in to comment.