Skip to content

Share IL2CPP invocation handling used by loading and transition screens - #304

Closed
Guffawaffle wants to merge 2 commits into
STFC-Mod:devfrom
Guffawaffle:feature/il2cpp-runtime-helpers
Closed

Guffawaffle wants to merge 2 commits into
STFC-Mod:devfrom
Guffawaffle:feature/il2cpp-runtime-helpers

Conversation

@Guffawaffle

@Guffawaffle Guffawaffle commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Loading and transition screens repeat managed-call failure handling and Boolean extraction. This moves those operations into two shared IL2CPP helpers and uses them in the existing screen code, with regression coverage for their return and failure contracts.

TryInvoke forwards the resolved method, target and argument array. A missing method or managed exception returns failure; a successful null/void result still returns success. TryBoolean checks that a result is a non-byref Boolean before unboxing it. The screen wrappers keep their existing warnings and null/false fallbacks; an unexpected Boolean result type now also falls back to false.

The shared API contains only those two functions. Class/method lookup stays on the existing helpers. Callers still establish the method signature and argument storage, own object lifetimes, and decide how to report failures. Integer extraction and screen-specific behavior remain local.

Validation: Windows release build and production-header regression fixtures passed. The fixtures cover argument forwarding, static calls, successful null/void returns, managed exceptions, invalid Boolean metadata and failed unboxing; they run in Windows and both macOS CI jobs. The loading-screen conversion passed Windows player smoke in the combined downstream build; that is not standalone runtime qualification of this PR.

Pending settings, timer, galaxy-label, OPC and Warp/Jump work can reuse these functions. Those features are not required to review or land this change.

@Guffawaffle Guffawaffle changed the title Extract shared IL2CPP helpers used by pending feature PRs Share IL2CPP invocation handling used by loading and transition screens Sep 22, 2026

@netniV netniV left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to be updating the CI every 5 minutes with more and more tests. In fact, I plan to strip out those that have been added because we wanted to streamline the CI builds. I have no issue with local builds running tests as part of the development builds, but not the CI. However, it needs to make sure that it's not constantly updating the xmake.lua's that are used as part of the versioning detection of CI

Also, I plan to update things so only the EN example file is updated by AI, the rest will be updated by the modconfig processes.

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.

2 participants