Skip to content
Permalink
Browse files

[skip ci] GSDumpgui: Handle dumpPath as optional. (#2981)

GsDump file can be optional in case you just want to launch the plugin config dialog.
Throw with a meaningful error message in case validation layer fails.
  • Loading branch information...
willkuer authored and lightningterror committed Jun 6, 2019
1 parent cd11ae1 commit a3bf46ecd9a96738d6e60771108af34016edd856
Showing with 4 additions and 1 deletion.
  1. +4 −1 tools/GSDumpGUI/Forms/frmMain.cs
@@ -263,8 +263,11 @@ private void ExecuteFunction(String Function)
}
var port = Program.Server.Port;

// dll path is mandatory for the two operations GSReplay and GSconfigure but dumpPath only for GSReplay
var dllPath = _availableGsDlls.Selected.File.FullName;
var dumpPath = _availableGsDumps.Selected.File.FullName;
var dumpPath = _availableGsDumps.Selected?.File?.FullName;
if (string.IsNullOrWhiteSpace(dumpPath) && "GSReplay".Equals(Function))
throw new ArgumentException("You need to specify a dump path in case you want to replay a GsDump.", nameof(dumpPath));

_gsdxLogger.Information("Start new gsdx instance");
_gsdxLogger.Information($"\tdll: {dllPath}");

0 comments on commit a3bf46e

Please sign in to comment.
You can’t perform that action at this time.