This commit is contained in:
parent
081fa9dbec
commit
d14d5233b7
|
@ -887,14 +887,16 @@ public:
|
|||
{
|
||||
str.resize(strl);
|
||||
ret = wchar_to_char(str, p, &strl);
|
||||
if (str.empty())
|
||||
{
|
||||
return SCANNER_ERR_DATA_DAMAGED;
|
||||
}
|
||||
dpi = atoi(str.c_str());
|
||||
}
|
||||
if (str.empty())
|
||||
if (dpi > 0)
|
||||
{
|
||||
return SCANNER_ERR_DATA_DAMAGED;
|
||||
ret = helper_->io_control(IO_CTRL_CODE_SET_DPI, &dpi, &len);
|
||||
}
|
||||
dpi = atoi(str.c_str());
|
||||
ret = helper_->io_control(IO_CTRL_CODE_SET_DPI, &dpi, &len);
|
||||
|
||||
if (ret != SCANNER_ERR_OK)
|
||||
{
|
||||
return -1;
|
||||
|
@ -924,13 +926,16 @@ public:
|
|||
{
|
||||
str.resize(strl);
|
||||
ret = wchar_to_char(str, p, &strl);
|
||||
if (str.empty())
|
||||
{
|
||||
return SCANNER_ERR_DATA_DAMAGED;
|
||||
}
|
||||
dpi = atoi(str.c_str());
|
||||
}
|
||||
if (str.empty())
|
||||
if (dpi > 0)
|
||||
{
|
||||
return SCANNER_ERR_DATA_DAMAGED;
|
||||
ret = helper_->io_control(IO_CTRL_CODE_SET_DPI, &dpi, &llen);
|
||||
}
|
||||
dpi = atoi(str.c_str());
|
||||
ret = helper_->io_control(IO_CTRL_CODE_SET_DPI, &dpi, &llen);
|
||||
|
||||
ret = helper_->io_control(IO_CTRL_CODE_SET_DISTORTION_IMAGE, &type, &len);
|
||||
if (ret != SCANNER_ERR_OK)
|
||||
|
@ -949,8 +954,6 @@ public:
|
|||
else if (cnt == 10)
|
||||
break;
|
||||
|
||||
|
||||
|
||||
Sleep(1000);
|
||||
cnt++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue