genesys: Add a way to override logical HW dpi

merge-requests/187/head
Povilas Kanapickas 2019-09-15 15:14:17 +03:00
rodzic 34c7a4cb29
commit 00b8441dfa
2 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -279,6 +279,10 @@ struct Genesys_Sensor {
// resolution. The value zero does not set the override.
unsigned register_dpihw_override = 0;
// The scanner may be setup to use a custom logical dpihw that does not correspond to any actual
// resolution. The value zero does not set the override.
unsigned logical_dpihw_override = 0;
// The scanner may be setup to use a custom dpiset value that does not correspond to any actual
// resolution. The value zero does not set the override.
unsigned dpiset_override = 0;

Wyświetl plik

@ -47,6 +47,9 @@
inline unsigned default_get_logical_hwdpi(const Genesys_Sensor& sensor, unsigned xres)
{
if (sensor.logical_dpihw_override)
return sensor.logical_dpihw_override;
// can't be below 600 dpi
if (xres <= 600) {
return 600;