diff --git a/app/src/main/cpp/MicroPhoto.cpp b/app/src/main/cpp/MicroPhoto.cpp index b556c70f..6cc9e202 100644 --- a/app/src/main/cpp/MicroPhoto.cpp +++ b/app/src/main/cpp/MicroPhoto.cpp @@ -389,6 +389,10 @@ Java_com_xypower_mpapp_MicroPhotoService_takePhoto( std::string configFilePathStr = jstring2string(env, configFilePath); CFG_CHANNEL cfg; + cfg.camera_id = channel - 1; + cfg.quality = DEFAULT_JPEG_QUALITY; + cfg.requestTemplate = 2; + IDevice::PHOTO_INFO photoInfo(channel, preset); CTerminal::LoadChannelConfig(channel, configFilePathStr, cfg); CTerminal::ConvertChannelConfigToPhotoInfo(cfg, photoOrVideo != JNI_FALSE, photoInfo); @@ -501,6 +505,7 @@ Java_com_xypower_mpapp_MicroPhotoService_uninit( } pTerminal->SignalExit(); pTerminal->Shutdown(); + dev = pTerminal->GetDevice(); if (dev != NULL) { delete dev;