diff --git a/CHDStudio/MainWindow.axaml.cs b/CHDStudio/MainWindow.axaml.cs index 147f4ae..9115df8 100644 --- a/CHDStudio/MainWindow.axaml.cs +++ b/CHDStudio/MainWindow.axaml.cs @@ -6847,12 +6847,21 @@ private async Task ConvertToChdAsync( // not apply to it. var pspHunk = _pspHunkSize && !isAvi; - var command = - isAvi ? "createld" - : !pspHunk && (forceCd || (!forceDvd && !isIso && !isImg && !isRaw)) ? "createcd" - : pspHunk || forceDvd || isIso ? "createdvd" - : isImg ? "createhd" - : "createraw"; + string command; + if (isAvi) + command = "createld"; + else if (pspHunk) + command = "createdvd"; + else if (forceCd) + command = "createcd"; + else if (!forceDvd && !isIso && !isImg && !isRaw) + command = "createcd"; + else if (forceDvd || isIso) + command = "createdvd"; + else if (isImg) + command = "createhd"; + else + command = "createraw"; if (isAvi && _createDeltaChd) { diff --git a/docs/05-conversion-pipeline.md b/docs/05-conversion-pipeline.md index 8a77ad6..c524cb9 100644 --- a/docs/05-conversion-pipeline.md +++ b/docs/05-conversion-pipeline.md @@ -112,11 +112,13 @@ The conversion writes to `.<8hex>.chdtmp` next to the destination and move ### Command & argument selection ```csharp -command = isAvi ? "createld" - : !pspHunk && (forceCd || (!forceDvd && !isIso && !isImg && !isRaw)) ? "createcd" - : pspHunk || forceDvd || isIso ? "createdvd" - : isImg ? "createhd" - : "createraw"; +if (isAvi) command = "createld"; +else if (pspHunk) command = "createdvd"; +else if (forceCd) command = "createcd"; +else if (!forceDvd && !isIso && !isImg && !isRaw) command = "createcd"; +else if (forceDvd || isIso) command = "createdvd"; +else if (isImg) command = "createhd"; +else command = "createraw"; ``` - `pspHunk` — the **PSP 2048 hunk** option forces `createdvd` and adds `-hs 2048`, the hunk size PPSSPP recommends for PSP ISOs. The built-in CHDSharp encoder receives the same override. The option is not applied to laserdisc input and is rejected with a delta CHD, whose parent hunk size must match.