mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-22 20:43:09 +00:00
Fix the active audio device being set for the audio player.
This commit is contained in:
parent
d6fce135eb
commit
ecf8dae084
3 changed files with 7 additions and 3 deletions
|
@ -80,7 +80,6 @@ namespace FirstPlugin
|
|||
|
||||
uint Width = (uint)Math.Pow(2, texDims / 16);
|
||||
uint Height = (uint)Math.Pow(2, texDims % 16);
|
||||
|
||||
if (flags > 0)
|
||||
{
|
||||
var extSize = reader.ReadInt32();
|
||||
|
@ -105,8 +104,8 @@ namespace FirstPlugin
|
|||
tex.MipCount = (uint)mipSys >> 4;
|
||||
uint texSys = (uint)mipSys & 0xF;
|
||||
|
||||
uint textureSize = 0;
|
||||
uint mortonWidth = 0;
|
||||
uint textureSize = (Width * Height * STGenericTexture.GetBytesPerPixel(tex.Format)) / 8;
|
||||
switch (format)
|
||||
{
|
||||
case 0x00: //ABGR
|
||||
|
@ -173,6 +172,9 @@ namespace FirstPlugin
|
|||
throw new Exception("Unsupported format! " + format.ToString("x"));
|
||||
}
|
||||
|
||||
if (textureSize == 0)
|
||||
textureSize = (Width * Height * STGenericTexture.GetBytesPerPixel(tex.Format)) / 8;
|
||||
|
||||
if (format == 0x09)
|
||||
textureSize = (Width * Height * 64) / 8;
|
||||
if (format == 0x01)
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace FirstPlugin
|
|||
|
||||
public bool CanSave { get; set; }
|
||||
public string[] Description { get; set; } = new string[] { "Hyrule Warriors Resource (bin.gz)" };
|
||||
public string[] Extension { get; set; } = new string[] { "*.pac" };
|
||||
public string[] Extension { get; set; } = new string[] { "*.bin.gz" };
|
||||
public string FileName { get; set; }
|
||||
public string FilePath { get; set; }
|
||||
public IFileInfo IFileInfo { get; set; }
|
||||
|
|
|
@ -458,6 +458,8 @@ namespace Toolbox.Library.Forms
|
|||
|
||||
private void audioDevice_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (audioDevice.SelectedIndex != -1)
|
||||
activeDevice = (MMDevice)audioDevice.SelectedItem;
|
||||
}
|
||||
|
||||
private void channelCB_SelectedIndexChanged(object sender, EventArgs e)
|
||||
|
|
Loading…
Reference in a new issue