Skip to content

[PATCH] JKXR/OpenJO: fix Traditional Chinese Big5 rendering and GUI selection - #36

Open
hsz0566 wants to merge 1 commit into
Team-Beef-Studios:mainfrom
hsz0566:fix/jkxr-traditional-chinese
Open

[PATCH] JKXR/OpenJO: fix Traditional Chinese Big5 rendering and GUI selection#36
hsz0566 wants to merge 1 commit into
Team-Beef-Studios:mainfrom
hsz0566:fix/jkxr-traditional-chinese

Conversation

@hsz0566

@hsz0566 hsz0566 commented Jul 26, 2026

Copy link
Copy Markdown

Hello Team Beef Studios,

I would like to submit a Traditional Chinese rendering fix for the Jedi
Outcast mode in JKXR.

The patch is based on Team Beef JKXR commit:

9c0967a070a8251079023bde08ef9309cd6cde3f

JKXR's OpenJO code uses sp_language to select Jedi Outcast STRIP strings, so
sp_language 5 correctly selects TEXT_LANGUAGE6. However, the renderer's
language enum and Asian font cache still use the Jedi Academy se_language
path. The JK2 character decoder also calls language helpers that inspect
se_language.

This causes two inconsistent states:

  • Traditional Chinese STRIP text is selected correctly.
  • The renderer remains in Western mode, so Big5 characters are decoded and
    drawn incorrectly.

The attached patch unifies the JK2 renderer around sp_language:

  1. GetLanguageEnum() maps JK2's numeric sp_language to Korean, Taiwanese,
    Japanese, or Western.
  2. The JK2 character decoder uses that enum for multi-byte decoding.
  3. The Asian font cache tracks the JK2 language integer instead of
    se_language->modificationCount.
  4. The JK2 UI calls JK2SP_CheckForLanguageUpdates() after sp_language
    changes, so STRIP strings and renderer decoding switch together.
  5. The JKXR Setup and in-game Setup menus expose
    Taiwanese = 5, allowing users to select Traditional Chinese without
    manually editing a CFG file.
  6. JKXR presents 2D in-game cinematics on its comfortable-distance VR quad
    screen, matching the official v1.1.28 APK behavior.
  7. The Jedi Academy path remains unchanged.

Validation performed:

  • Built the complete JKXR Android Release APK successfully with Android SDK
    34, NDK 26.1.10909125, and Gradle 8.5.
  • Verified APK Signature Scheme v2.
  • Verified package com.drbeef.jkxr, version 1.1.28, ARM64 ABI.
  • Verified the APK includes libopenjk_jo.so,
    librd-gles-jo_arm.so, and the generic OpenXR loader.
  • git diff --check and forward/reverse git apply --check pass.
  • The localization data used for analysis contains 2,238 valid Big5
    TEXT_LANGUAGE6 entries and all four Taiwanese font pages.
  • Manually installed and launched the validation APK on a Meta Quest 3.
  • Confirmed on the headset that the Jedi Outcast main menu renders Traditional
    Chinese text correctly with sp_language 5.
  • A photograph of the successful Quest 3 test is included as visual evidence.

That first headset test exposed a separate live-switching issue: changing from
Traditional Chinese to English changed renderer decoding before the JK2 STRIP
package was reloaded. The patch now also fixes the JK2 UI update call. The
revised source builds successfully; repeated
Traditional Chinese -> English -> Traditional Chinese switching is the final
on-headset regression test requested for the updated APK.

The revised APK also restores the official v1.1.28 screen-layer condition for
2D in-game cinematics. Current main made that condition depend on
vr_immersive_cinematics, whose default is enabled; this could present the
opening video directly in the viewer's field of view instead of on the
distance-adjusted quad screen.

The source patch is the intended submission. The test APK was signed only for
local validation and does not need to be distributed with the pull request.

Attachments:

  • 0001-jkxr-fix-traditional-chinese-big5-rendering.patch
  • TESTING.md
  • quest3-traditional-chinese-test.jpg

Thank you for reviewing the patch.

JACoders/OpenJK#1346

Best regards,
Song / hsz0566
0001-jkxr-fix-traditional-chinese-big5-rendering.patch
TESTING.md
quest3-traditional-chinese-test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant