mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-10-09 11:28:58 -07:00
sdk: add get_module_info, get_plugin_directory, d3d9 callbacks (#908)
## Link to GitHub Issue or related Pull Request, if one exists n/a ## Description of change To make plugin development easier, add `get_module_info` and `get_plugin_directory` to deal with common tasks for hooking DLLs and reading INI files. Also, add the ability to register for d3d9 present callbacks via `register_d3d9`, which makes it significantly easier for plugins to draw things on screen. ## Testing See sample code.
This commit is contained in:
@@ -719,6 +719,8 @@ set(SOURCE_FILES ${SOURCE_FILES}
|
||||
reader/crypt.cpp
|
||||
|
||||
# sdk
|
||||
sdk/d3d9.cpp
|
||||
sdk/modules.cpp
|
||||
sdk/sdk.cpp
|
||||
|
||||
# stubs
|
||||
@@ -1047,8 +1049,16 @@ if(NOT MSVC)
|
||||
endif()
|
||||
|
||||
# sdk_sample_v0_cpp.dll (64 bit)
|
||||
set(SOURCE_FILES sdk/sample/v0/cpp/v0_cpp.cpp)
|
||||
set(SOURCE_FILES
|
||||
sdk/sample/v0/cpp/v0_cpp.cpp
|
||||
sdk/sample/v0/cpp/v0_cpp_imgui.cpp
|
||||
external/imgui/imgui.cpp
|
||||
external/imgui/imgui_draw.cpp
|
||||
external/imgui/imgui_tables.cpp
|
||||
external/imgui/imgui_widgets.cpp
|
||||
external/imgui/backends/imgui_impl_dx9.cpp)
|
||||
add_library(spicetools_sdk_sample_v0_cpp_64 SHARED ${SOURCE_FILES} ${RESOURCE_FILES} sdk/sample/v0/cpp/v0_cpp.def)
|
||||
target_link_libraries(spicetools_sdk_sample_v0_cpp_64 PRIVATE imm32)
|
||||
set_target_properties(spicetools_sdk_sample_v0_cpp_64 PROPERTIES PREFIX "")
|
||||
set_target_properties(spicetools_sdk_sample_v0_cpp_64 PROPERTIES OUTPUT_NAME "sdk_sample_v0_cpp")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user