mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-02 12:56:05 +00:00
sceNgs2ReportRegisterHandler and sceNgs2ReportUnregisterHandler stop being throwing stubs: they keep a registry of report handlers, so a title that imports them can register and later drop its handler. Register rejects a null handler with an invalid argument and returns INVALID_OUT_ADDRESS for a null out handle, then stores the report type, handler and user data under a freshly allocated opaque handle. Unregister removes and frees the matching record and throws for a handle that is not registered. The signatures follow SharpProspero and shadPS4's ngs2_report.h, and the 24-byte Ngs2ReportDataHeader passed to a handler is its OrbisNgs2ReportDataHeader. No report is produced yet, so no registered handler is ever invoked.
26 lines
1010 B
CMake
26 lines
1010 B
CMake
function(add_sce_ngs2_library target)
|
|
set(ngs2Dir ${CMAKE_CURRENT_FUNCTION_LIST_DIR})
|
|
add_library(${target} SHARED EXCLUDE_FROM_ALL
|
|
${ngs2Dir}/src/Atrac9.cpp
|
|
${ngs2Dir}/src/Custom.cpp
|
|
${ngs2Dir}/src/Geom.cpp
|
|
${ngs2Dir}/src/Pan.cpp
|
|
${ngs2Dir}/src/Rack.cpp
|
|
${ngs2Dir}/src/Render.cpp
|
|
${ngs2Dir}/src/Reverb.cpp
|
|
${ngs2Dir}/src/System.cpp
|
|
${ngs2Dir}/src/Voice.cpp
|
|
)
|
|
target_include_directories(${target} PRIVATE ${LIBS_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/3rdparty/LibAtrac9/C/src)
|
|
target_link_libraries(${target} PRIVATE atrac9 libc libkernel)
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
target_link_options(${target} PRIVATE LINKER:--exclude-libs,ALL)
|
|
endif()
|
|
set_target_properties(${target} PROPERTIES
|
|
CXX_EXTENSIONS OFF
|
|
CXX_VISIBILITY_PRESET hidden
|
|
VISIBILITY_INLINES_HIDDEN ON
|
|
)
|
|
configure_windows_unwind(${target})
|
|
endfunction()
|