mirror of
https://github.com/soukoku/ntwain.git
synced 2025-10-08 00:14:38 +08:00
Merged in blackoverlord89/ntwain (pull request #8)
Plustek OpticSlim 2680H fix Approved-by: blackoverlord89 <blackoverlord89@gmail.com>
This commit is contained in:
@@ -29,8 +29,18 @@ namespace NTwain.Internals
|
|||||||
if (session.DGControl.XferGroup.Get(ref xferGroup) == ReturnCode.Success)
|
if (session.DGControl.XferGroup.Get(ref xferGroup) == ReturnCode.Success)
|
||||||
{
|
{
|
||||||
xferAudio = (xferGroup & DataGroups.Audio) == DataGroups.Audio;
|
xferAudio = (xferGroup & DataGroups.Audio) == DataGroups.Audio;
|
||||||
|
// check for Plustek OpticSlim 2680H, this scanner returns wrong xferGroup after first scanning
|
||||||
|
if (session.CurrentSource.Identity.ProductName.IndexOf("Plustek", StringComparison.OrdinalIgnoreCase) > -1 &&
|
||||||
|
session.CurrentSource.Identity.ProductName.IndexOf("OpticSlim", StringComparison.OrdinalIgnoreCase) > -1 &&
|
||||||
|
session.CurrentSource.Identity.ProductName.IndexOf("2680H", StringComparison.OrdinalIgnoreCase) > -1)
|
||||||
|
{
|
||||||
|
xferImage = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
xferImage = xferGroup == DataGroups.None || (xferGroup & DataGroups.Image) == DataGroups.Image;
|
xferImage = xferGroup == DataGroups.None || (xferGroup & DataGroups.Image) == DataGroups.Image;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// some DS end up getting none but we will assume it's image
|
// some DS end up getting none but we will assume it's image
|
||||||
if (xferImage)
|
if (xferImage)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user