3 Commits

Author SHA1 Message Date
yuanyuanxiang
011ec3d509 Improve keyboard input user-experience and support Shift 2026-04-22 12:00:42 +02:00
yuanyuanxiang
01c7fc1c63 Fix: Web remote desktop double-tap drag functionality 2026-04-21 11:32:49 +02:00
yuanyuanxiang
80f95a41b2 Improve: Web remote desktop two-finger gesture recognition 2026-04-20 23:59:25 +02:00
3 changed files with 682 additions and 169 deletions

View File

@@ -61,7 +61,7 @@ elseif ($msBuild -match "\\18\\") { $vsYear = "2019 Insiders" }
Write-Host "Using MSBuild: $msBuild" -ForegroundColor Cyan
$rootDir = $PSScriptRoot
$slnFile = Join-Path $rootDir "2019Remote.sln"
$slnFile = Join-Path $rootDir "YAMA.sln"
$upxPath = Join-Path $rootDir "server\2015Remote\res\3rd\upx.exe"
# Publish mode overrides

File diff suppressed because it is too large Load Diff

View File

@@ -13,6 +13,7 @@
#include <gtest/gtest.h>
#include <cstring>
#include <ctime>
#include <cstdlib>
#include <map>
#include <chrono>
#include <cmath>
@@ -88,16 +89,19 @@ private:
int daysBetweenDates(const tm& date1, const tm& date2)
{
auto timeToTimePoint = [](const tm& tmTime) {
std::time_t tt = mktime(const_cast<tm*>(&tmTime));
return std::chrono::system_clock::from_time_t(tt);
// Use Julian Day Number to avoid DST issues
// Formula: https://en.wikipedia.org/wiki/Julian_day
auto toJulianDay = [](int year, int month, int day) {
int a = (14 - month) / 12;
int y = year + 4800 - a;
int m = month + 12 * a - 3;
return day + (153 * m + 2) / 5 + 365 * y + y / 4 - y / 100 + y / 400 - 32045;
};
auto tp1 = timeToTimePoint(date1);
auto tp2 = timeToTimePoint(date2);
int jd1 = toJulianDay(date1.tm_year + 1900, date1.tm_mon + 1, date1.tm_mday);
int jd2 = toJulianDay(date2.tm_year + 1900, date2.tm_mon + 1, date2.tm_mday);
auto duration = tp1 > tp2 ? tp1 - tp2 : tp2 - tp1;
return static_cast<int>(std::chrono::duration_cast<std::chrono::hours>(duration).count() / 24);
return std::abs(jd1 - jd2);
}
tm getCurrentDate()