shinkos2145: fast return needed tweaking.
This commit is contained in:
parent
a7eff10ed6
commit
825b82ef61
|
@ -1357,9 +1357,10 @@ int shinkos2145_cmdline_arg(void *vctx, int argc, char **argv)
|
||||||
else
|
else
|
||||||
return 1;
|
return 1;
|
||||||
case 'f':
|
case 'f':
|
||||||
if (ctx)
|
if (ctx) {
|
||||||
ctx->fast_return = 1;
|
ctx->fast_return = 1;
|
||||||
else
|
return 0;
|
||||||
|
} else
|
||||||
return 1;
|
return 1;
|
||||||
case 'F':
|
case 'F':
|
||||||
if (ctx)
|
if (ctx)
|
||||||
|
@ -1432,7 +1433,7 @@ static void *shinkos2145_init(void)
|
||||||
memset(ctx, 0, sizeof(struct shinkos2145_ctx));
|
memset(ctx, 0, sizeof(struct shinkos2145_ctx));
|
||||||
|
|
||||||
/* Use Fast return by default in CUPS mode */
|
/* Use Fast return by default in CUPS mode */
|
||||||
if (getenv("DEVICE_URI"))
|
if (getenv("DEVICE_URI") || getenv("FAST_RETURN"))
|
||||||
ctx->fast_return = 1;
|
ctx->fast_return = 1;
|
||||||
|
|
||||||
return ctx;
|
return ctx;
|
||||||
|
@ -1443,7 +1444,6 @@ static void shinkos2145_attach(void *vctx, struct libusb_device_handle *dev,
|
||||||
{
|
{
|
||||||
struct shinkos2145_ctx *ctx = vctx;
|
struct shinkos2145_ctx *ctx = vctx;
|
||||||
|
|
||||||
|
|
||||||
ctx->dev = dev;
|
ctx->dev = dev;
|
||||||
ctx->endp_up = endp_up;
|
ctx->endp_up = endp_up;
|
||||||
ctx->endp_down = endp_down;
|
ctx->endp_down = endp_down;
|
||||||
|
|
Loading…
Reference in New Issue