mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Fix passing by of media type by dumping methods.
This commit is contained in:
@@ -62,8 +62,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
partial class Dump
|
||||
{
|
||||
/// <summary>Dumps a compact disc</summary>
|
||||
/// <param name="dskType">Disc type as detected in MMC layer</param>
|
||||
void CompactDisc(out MediaType dskType)
|
||||
void CompactDisc()
|
||||
{
|
||||
ExtentsULong audioExtents; // Extents with audio sectors
|
||||
ulong blocks; // Total number of positive sectors
|
||||
@@ -115,7 +114,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
Dictionary<MediaTagType, byte[]> mediaTags = new Dictionary<MediaTagType, byte[]>(); // Media tags
|
||||
|
||||
dskType = MediaType.CD;
|
||||
MediaType dskType = MediaType.CD;
|
||||
|
||||
if(_dumpRaw)
|
||||
{
|
||||
|
||||
@@ -50,8 +50,9 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
partial class Dump
|
||||
{
|
||||
/// <summary>Dumps an optical disc</summary>
|
||||
void Mmc(ref MediaType dskType)
|
||||
void Mmc()
|
||||
{
|
||||
MediaType dskType = MediaType.Unknown;
|
||||
bool sense;
|
||||
byte[] tmpBuf;
|
||||
bool compactDisc = true;
|
||||
@@ -194,7 +195,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
if(compactDisc)
|
||||
{
|
||||
CompactDisc(out dskType);
|
||||
CompactDisc();
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -681,12 +682,12 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
if(isXbox)
|
||||
{
|
||||
Xgd(mediaTags, ref dskType);
|
||||
Xgd(mediaTags, dskType);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Sbc(mediaTags, ref dskType, true);
|
||||
Sbc(mediaTags, dskType, true);
|
||||
}
|
||||
|
||||
static void AddMediaTagToSidecar(string outputPath, KeyValuePair<MediaTagType, byte[]> tag,
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
/// <param name="opticalDisc">If device contains an optical disc (e.g. DVD or BD)</param>
|
||||
/// <param name="mediaTags">Media tags as retrieved in MMC layer</param>
|
||||
/// <param name="dskType">Disc type as detected in SCSI or MMC layer</param>
|
||||
internal void Sbc(Dictionary<MediaTagType, byte[]> mediaTags, ref MediaType dskType, bool opticalDisc)
|
||||
internal void Sbc(Dictionary<MediaTagType, byte[]> mediaTags, MediaType dskType, bool opticalDisc)
|
||||
{
|
||||
bool sense;
|
||||
byte scsiMediumType = 0;
|
||||
|
||||
@@ -45,7 +45,6 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
/// <summary>Dumps a SCSI Block Commands device or a Reduced Block Commands devices</summary>
|
||||
public void Scsi()
|
||||
{
|
||||
MediaType dskType = MediaType.Unknown;
|
||||
int resets = 0;
|
||||
|
||||
if(_dev.IsRemovable)
|
||||
@@ -235,14 +234,14 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
return;
|
||||
case PeripheralDeviceTypes.MultiMediaDevice:
|
||||
if(_outputPlugin is IWritableOpticalImage)
|
||||
Mmc(ref dskType);
|
||||
Mmc();
|
||||
else
|
||||
StoppingErrorMessage?.
|
||||
Invoke("The specified plugin does not support storing optical disc images.");
|
||||
|
||||
return;
|
||||
default:
|
||||
Sbc(null, ref dskType, false);
|
||||
Sbc(null, MediaType.Unknown, false);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
/// <summary>Dumps an Xbox Game Disc using a Kreon drive</summary>
|
||||
/// <param name="mediaTags">Media tags as retrieved in MMC layer</param>
|
||||
/// <param name="dskType">Disc type as detected in MMC layer</param>
|
||||
internal void Xgd(Dictionary<MediaTagType, byte[]> mediaTags, ref MediaType dskType)
|
||||
internal void Xgd(Dictionary<MediaTagType, byte[]> mediaTags, MediaType dskType)
|
||||
{
|
||||
bool sense;
|
||||
const uint BLOCK_SIZE = 2048;
|
||||
|
||||
Reference in New Issue
Block a user