summaryrefslogtreecommitdiffstats
path: root/win/CS/frmPreview.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-12-01 21:24:36 +0000
committersr55 <[email protected]>2011-12-01 21:24:36 +0000
commit608d03fdab381791aef98ddb53eea09e8f42bb57 (patch)
tree4c4e83dd51eb5de9b3a638aac5a2ca337b55eff3 /win/CS/frmPreview.cs
parent0755d229e3d67c896e441af22e93371fb56c466f (diff)
WinGui: Fix VLC detection bug.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4369 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/frmPreview.cs')
-rw-r--r--win/CS/frmPreview.cs22
1 files changed, 13 insertions, 9 deletions
diff --git a/win/CS/frmPreview.cs b/win/CS/frmPreview.cs
index 4251923f3..f070e0503 100644
--- a/win/CS/frmPreview.cs
+++ b/win/CS/frmPreview.cs
@@ -241,20 +241,24 @@ namespace Handbrake
}
else
{
+ if (!File.Exists(UserSettingService.GetUserSetting<string>(UserSettingConstants.VLC_Path)))
+ {
+ // Attempt to find VLC if it doesn't exist in the default set location.
+ string vlcPath;
- // Attempt to find VLC if it doesn't exist in the default set location.
- string vlcPath;
-
- if (8 == IntPtr.Size ||
- (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432")))) vlcPath = Environment.GetEnvironmentVariable("ProgramFiles(x86)");
- else vlcPath = Environment.GetEnvironmentVariable("ProgramFiles");
+ if (8 == IntPtr.Size || (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432"))))
+ vlcPath = Environment.GetEnvironmentVariable("ProgramFiles(x86)");
+ else
+ vlcPath = Environment.GetEnvironmentVariable("ProgramFiles");
+ if (!string.IsNullOrEmpty(vlcPath))
+ {
+ vlcPath = Path.Combine(vlcPath, "VideoLAN\\VLC\\vlc.exe");
+ }
- if (!File.Exists(UserSettingService.GetUserSetting<string>(UserSettingConstants.VLC_Path)))
- {
if (File.Exists(vlcPath))
{
- UserSettingService.SetUserSetting(UserSettingConstants.VLC_Path, "C:\\Program Files (x86)\\VideoLAN\\VLC\\vlc.exe");
+ UserSettingService.SetUserSetting(UserSettingConstants.VLC_Path, vlcPath);
}
else
{