Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Commit

Permalink
Fix error message on dll load error.
Browse files Browse the repository at this point in the history
  • Loading branch information
polygraphene committed Jun 27, 2018
1 parent 8c5c70f commit f39e7d3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions ALVR/Launcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,18 @@ private void Launcher_Load(object sender, EventArgs e)
// Get sound devices
//

var list = SoundDevice.GetSoundDeviceList();
foreach (var device in list)
try
{
soundDeviceComboBox.Items.Add(device);
var list = SoundDevice.GetSoundDeviceList();
foreach (var device in list)
{
soundDeviceComboBox.Items.Add(device);
}
}
catch (Exception e2)
{
Application.Exit();
return;
}

//
Expand Down
2 changes: 1 addition & 1 deletion ALVR/SoundDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static public List<string> GetSoundDeviceList()
if (pDll == IntPtr.Zero)
{
int err = Marshal.GetLastWin32Error();
MessageBox.Show("Cannot load library. ALVR works only on 64bits Windows.\r\n" + Utils.GetDllPath(Utils.GetDriverPath()) + "\r\nCode:" + err);
MessageBox.Show("Cannot load library. ALVR works only on 64bits Windows with NVIDIA GPU.\r\n" + Utils.GetDllPath(Utils.GetDriverPath()) + "\r\nCode:" + err);
throw new Exception();
}

Expand Down

0 comments on commit f39e7d3

Please sign in to comment.