From d5b46fb3432b73e60d23cf1d6cb33af55121eca3 Mon Sep 17 00:00:00 2001 From: "XI.CHEN" <2311041011@qq.com> Date: Tue, 31 Dec 2024 13:56:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8F=B3=E4=B8=8AOSD=E6=8D=A2=E8=A1=8C?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/PhoneDevice.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index 6af7fc80..028aa0fe 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -3421,6 +3421,8 @@ bool CPhoneDevice::PostProcessPhoto(const PHOTO_INFO& photoInfo, const vector (int)width - 1) { @@ -3467,6 +3469,16 @@ bool CPhoneDevice::PostProcessPhoto(const PHOTO_INFO& photoInfo, const vectoralignment == OSD_ALIGNMENT_TOP_RIGHT) { + std::size_t newlinePos = it->text.find('\n'); + if (newlinePos != std::string::npos) + { + std::string textBeforeNewline = it->text.substr(0, newlinePos); + std::string textAfterNewline = it->text.substr(newlinePos + 1); + if(textBeforeNewline.length()>=textAfterNewline.length()) + textSize = ft2->getTextSize(textBeforeNewline, fontSize, thickness, &baseline); + else + textSize = ft2->getTextSize(textAfterNewline, fontSize, thickness, &baseline); + } pt.x = width - textSize.width - it->x * ratio; pt.y= it->y * ratio; } From 2b6db343be5f9b3cb5188646b63b9bfd721823f1 Mon Sep 17 00:00:00 2001 From: "XI.CHEN" <2311041011@qq.com> Date: Tue, 31 Dec 2024 15:22:51 +0800 Subject: [PATCH 2/2] Update version to 1.1.42 Based Core Version to 1.2.29 --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 0549a4c3..a1642527 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,7 +5,7 @@ plugins { // 10,00,000 major-minor-build def AppMajorVersion = 1 def AppMinorVersion = 1 -def AppBuildNumber = 41 +def AppBuildNumber = 42 def AppVersionName = AppMajorVersion + "." + AppMinorVersion + "." + AppBuildNumber def AppVersionCode = AppMajorVersion * 100000 + AppMinorVersion * 1000 + AppBuildNumber