diff --git a/device/gxx-linux/usb/src/async_model/common/sane_cfg.cpp b/device/gxx-linux/usb/src/async_model/common/sane_cfg.cpp index 20e4a42..f7a53ba 100644 --- a/device/gxx-linux/usb/src/async_model/common/sane_cfg.cpp +++ b/device/gxx-linux/usb/src/async_model/common/sane_cfg.cpp @@ -351,19 +351,19 @@ data_type sane_cfg_provider::type_from_string(const char* type_desc) if(root->get_value(key, bv)) { val = std::string((char*)&bv, sizeof(bv)); - if(*type) + if(type) *type = DATA_TYPE_BOOL; } else if(root->get_value(key, nv)) { val = std::string((char*)&nv, sizeof(nv)); - if(*type) + if(type) *type = DATA_TYPE_INT4; } else if(root->get_value(key, fv)) { val = std::string((char*)&fv, sizeof(fv)); - if(*type) + if(type) *type = DATA_TYPE_FLOAT; } else diff --git a/device/gxx-linux/usb/src/async_model/img_process/algs/img_algorithm.cpp b/device/gxx-linux/usb/src/async_model/img_process/algs/img_algorithm.cpp index 020ca9d..1a6fea2 100644 --- a/device/gxx-linux/usb/src/async_model/img_process/algs/img_algorithm.cpp +++ b/device/gxx-linux/usb/src/async_model/img_process/algs/img_algorithm.cpp @@ -360,16 +360,17 @@ int32_t img_resizer::set_config(const char* cfg_name, void* data, size_t* len, u } bool img_resizer::update_enabled(const char* name, std::function get_opt) { - uint32_t dtype = 0; - std::string val(""); - - if(get_opt("cis-dpi", "cur", val, &dtype) == 0) - { - if(dtype == DATA_TYPE_INT4) - enable_ = dpi_ != *(int*)val.c_str(); - else if(dtype == DATA_TYPE_FLOAT) - enable_ = dpi_ != (int)*(double*)val.c_str(); - } + // uint32_t dtype = 0; + // std::string val(""); + // + // if(get_opt("cis-dpi", "cur", val, &dtype) == 0) + // { + // if(dtype == DATA_TYPE_INT4) + // enable_ = dpi_ != *(int*)val.c_str(); + // else if(dtype == DATA_TYPE_FLOAT) + // enable_ = dpi_ != (int)*(double*)val.c_str(); + // } + enable_ = true; return false; }