Skip to content

Commit

Permalink
a little fix about caret position
Browse files Browse the repository at this point in the history
  • Loading branch information
fanlumaster committed Oct 23, 2023
1 parent a8bcbe4 commit d4576f5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions launch.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ cmake -G "Visual Studio 17 2022" -A x64 -S . -B ./build/
if ($LASTEXITCODE -eq 0)
{
# DEBUG version
cmake --build ./build/ --config DEBUG
# cmake --build ./build/ --config DEBUG
# RELEASE version
# cmake --build ./build/ --config RELEASE
cmake --build ./build/ --config RELEASE
if ($LASTEXITCODE -eq 0)
{
$content = Get-Content -Path "./CMakeLists.txt"
Expand Down
6 changes: 4 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine,

// 初始化小鹤双拼的码表,纯双拼二码
// std::string dbPath = "../../src/flyciku.db";
// std::string dbPath = "./db/flyciku.db";
std::string dbPath = "./build/Debug/db/flyciku.db";
// 如果是发布阶段,就用这个
std::string dbPath = "./db/flyciku.db";
// 如果是调试阶段,那么,就用下面这个
// std::string dbPath = "./build/Debug/db/flyciku.db";
// sqlPageMap = transTableToMap(dbPath, 8); //
// 如果把这个放到钩子函数里面会导致程序很慢的
db = openSqlite(dbPath);
Expand Down
6 changes: 3 additions & 3 deletions src/utils/caret_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ std::pair<int, int> getGeneralCaretPos()
if (caretPos.first == 0 && caretPos.second == 0)
{
// caretPos = getCursorPosBySys();
caretPos = getCenterPointPosOfCurScreen();
caretPos.first += 20;
caretPos.second += 30;
caretPos = getCenterPointPosOfCurScreen(); // 既然是中心点的坐标,那么,就不需要做多余的处理
// caretPos.first += 20;
// caretPos.second += 30;
}

// std::cout << caretPos.first << '\t' << caretPos.second << '\n';
Expand Down

0 comments on commit d4576f5

Please sign in to comment.