mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 00:05:58 +03:00
[PR #3290] [CLOSED] Create templates for exposing C++ class member functions to guest code #3361
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#3361
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/3290
Author: @kalaposfos13
Created: 7/22/2025
Status: ❌ Closed
Base:
main← Head:json📝 Commits (9)
a36e812Stubbed library0a1c93dDemangling5d936b0Creating classes and structs from demangled function names66ddee6Why it no buildf43c382These are not functions488519cSure it compiles but will it insta crash upon trying to call a function with this setup thoc21bf76Register HLE alternative to libSceJsonc2a5673cleanupcc9857fThe RegisterLib saga continues📊 Changes
15 files changed (+845 additions, -10 deletions)
View changed files
📝
CMakeLists.txt(+2 -0)📝
src/common/logging/filter.cpp(+1 -0)📝
src/common/logging/types.h(+1 -0)➕
src/core/libraries/json/json.cpp(+624 -0)➕
src/core/libraries/json/json.h(+157 -0)📝
src/core/libraries/libc_internal/libc_internal.cpp(+1 -1)📝
src/core/libraries/libc_internal/libc_internal.h(+1 -1)📝
src/core/libraries/libs.cpp(+2 -0)📝
src/core/libraries/libs.h(+30 -0)📝
src/core/libraries/ngs2/ngs2.cpp(+1 -1)📝
src/core/libraries/ngs2/ngs2.h(+1 -1)📝
src/core/libraries/rtc/rtc.cpp(+1 -1)📝
src/core/libraries/rtc/rtc.h(+1 -1)📝
src/core/tls.h(+17 -0)📝
src/emulator.cpp(+5 -4)📄 Description
The two main features added in this PR are LIB_MEMBER_FUNCTION and LIB_OVERLOADED_MEMBER_FUNCTION, which are similar to LIB_FUNCTION but hopefully should work with class member functions instead. I'm not sure yet if they actually work as I haven't had the chance to test it yet, since the stubbed libSceJson library isn't used by any game I know of, which is what I made these for in the first place.
The PR also contains the stubbed libSceJson library itself with hopefully correct classes and function signatures (except the return values) based on me demangling the exported function names, and a small continuation of my earlier RegisterLib PR, where I've apparently missed a few libraries (which could have gone into a different PR I guess, but it's only just me renaming stuff so it's not too important).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.