Match tiTextDrawer Base::beginDraw height half via / 2.0f #485

Merged
coah80 merged 1 commits from cursor/titextdrawer-begindraw-half-e090 into main 2026-10-01 21:52:24 +00:00
coah80 commented 2026-10-01 21:38:04 +00:00 (Migrated from github.com)

Change

One-line change in src/keyboard/tiTextDrawer.cpp, Base::beginDraw:

f32 height = (mProjectionRect.bottom -
              mProjectionRect.top) / 2.0f;

(was * 0.5f). Existing line-break style on the bottom - top expression is kept.

Measurements (tiTextDrawer unit, 43U)

  • Before: fuzzy ~99.9885%, matched functions 23/24, matched code ~87.46%
  • After: beginDraw identical (109/109); all 24 target functions instruction-identical vs the original object; unit stays NonMatching
  • DOL sha1 remains 26116613f624061ba99c8d1a299aaa6efa85670d (unit is NonMatching, so the DOL is unchanged)

Notes

  • configure.py is intentionally left as NonMatching for tiTextDrawer. The Matching flip was tried and failed: undefined textinput::textdrawer::Base::isEnableCursorCache() const referenced from the vtable; also extra weak dtors emitted in the src object. .sdata2 is 44 vs orig 48 (zero hole — do not pad).
  • Parked: iplSDChannelObj_813E3580 is still exact-4 (r27 vs r29 Group*) after 6 attempts (declsearch; uncache langGroup; merged Group*; name[6]; groupName; end-iter).

Do not merge from this PR; orchestrator gates must be re-run on the branch before integration.

Open in Web Open in Cursor 
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> ## Change One-line change in `src/keyboard/tiTextDrawer.cpp`, `Base::beginDraw`: ```cpp f32 height = (mProjectionRect.bottom - mProjectionRect.top) / 2.0f; ``` (was `* 0.5f`). Existing line-break style on the `bottom - top` expression is kept. ## Measurements (tiTextDrawer unit, 43U) - Before: fuzzy ~99.9885%, matched functions 23/24, matched code ~87.46% - After: `beginDraw` identical (109/109); all 24 target functions instruction-identical vs the original object; unit stays `NonMatching` - DOL sha1 remains `26116613f624061ba99c8d1a299aaa6efa85670d` (unit is `NonMatching`, so the DOL is unchanged) ## Notes - `configure.py` is intentionally left as `NonMatching` for `tiTextDrawer`. The Matching flip was tried and failed: undefined `textinput::textdrawer::Base::isEnableCursorCache() const` referenced from the vtable; also extra weak dtors emitted in the src object. `.sdata2` is 44 vs orig 48 (zero hole — do not pad). - Parked: `iplSDChannelObj_813E3580` is still exact-4 (r27 vs r29 `Group*`) after 6 attempts (declsearch; uncache langGroup; merged `Group*`; `name[6]`; `groupName`; end-iter). Do not merge from this PR; orchestrator gates must be re-run on the branch before integration. <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-eb7b01f1-2216-50cf-82b0-78cb2497e090?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/background-agent?bcId=bc-eb7b01f1-2216-50cf-82b0-78cb2497e090&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>
coah80 commented 2026-10-01 21:52:21 +00:00 (Migrated from github.com)

Reviewed and merged. Clean rebuild: DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, beginDraw now exact. / 2.0f vs * 0.5f is exactly the kind of real source-form lever that should be tried first. Good call leaving the unit NonMatching and not padding .sdata2's 4-byte zero hole, and thanks for documenting the parked iplSDChannelObj_813E3580 attempts. Bittle's #487 fixes the isEnableCursorCache symbol name, which should clear the undefined-reference you hit when flipping tiTextDrawer.

Reviewed and merged. Clean rebuild: DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, beginDraw now exact. `/ 2.0f` vs `* 0.5f` is exactly the kind of real source-form lever that should be tried first. Good call leaving the unit NonMatching and not padding .sdata2's 4-byte zero hole, and thanks for documenting the parked iplSDChannelObj_813E3580 attempts. Bittle's #487 fixes the isEnableCursorCache symbol name, which should clear the undefined-reference you hit when flipping tiTextDrawer.
Sign in to join this conversation.