diff --git a/CMakeLists.txt b/CMakeLists.txt index 28d1d8e5..bd655fd4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,7 +43,15 @@ include_directories(./prod_include) find_package(PkgConfig REQUIRED) -#d3d9.so: +#libdsetup.so: + +#resolve wildcards and add "dsetup.cpp" as the first of the list +set(DSETUP_CPP libs/dsetup/dsetup.cpp) +file(GLOB_RECURSE DSETUP_CPP libs/dsetup/fun/*.cpp) + +add_library(dsetup SHARED ${DSETUP_CPP}) + +#libd3d9.so: add_library(d3d9 SHARED libs/d3d9/d3d9.cpp) #dxdiag: @@ -55,6 +63,7 @@ link_directories(${GTK4_LIBRARY_DIRS}) add_executable(dxdiag tools/dxdiag/main.cpp) target_link_libraries(dxdiag ${GTK4_LIBRARIES}) +target_link_libraries(dxdiag dsetup) target_link_libraries(dxdiag d3d9) diff --git a/libs/dsetup/README.md b/libs/dsetup/README.md new file mode 100644 index 00000000..7b5947c0 --- /dev/null +++ b/libs/dsetup/README.md @@ -0,0 +1,2 @@ +# libdsetup.so +Legacy code for DirectX Setup. This is a DLL that is loaded by the DirectX 9. \ No newline at end of file diff --git a/libs/dsetup/dsetup.cpp b/libs/dsetup/dsetup.cpp new file mode 100644 index 00000000..6da857e2 --- /dev/null +++ b/libs/dsetup/dsetup.cpp @@ -0,0 +1 @@ +#include "dsetup.hpp" \ No newline at end of file diff --git a/libs/dsetup/dsetup.hpp b/libs/dsetup/dsetup.hpp new file mode 100644 index 00000000..cd2f8708 --- /dev/null +++ b/libs/dsetup/dsetup.hpp @@ -0,0 +1 @@ +#include "fun/DirectXSetupGetVersion.hpp" \ No newline at end of file diff --git a/libs/dsetup/fun/DirectXSetupGetVersion.cpp b/libs/dsetup/fun/DirectXSetupGetVersion.cpp new file mode 100644 index 00000000..de092d1d --- /dev/null +++ b/libs/dsetup/fun/DirectXSetupGetVersion.cpp @@ -0,0 +1,17 @@ +#include "DirectXSetupGetVersion.hpp" + +/** + * @brief Get DirectX version + * + * @todo Implement this function + * * @see https://github.com/EduApps-CDG/OpenDX/wiki/dsetup.dll-or-libdsetup.so#int-directxsetupgetversiondword-dword + * + * @param ver + * @param rev + * @return int 1 (always?) + */ +int DirectXSetupGetVersion(DWORD* ver, DWORD* rev) { + *ver = 0; + *rev = 0; + return 1; +} \ No newline at end of file diff --git a/libs/dsetup/fun/DirectXSetupGetVersion.hpp b/libs/dsetup/fun/DirectXSetupGetVersion.hpp new file mode 100644 index 00000000..9b66ea8f --- /dev/null +++ b/libs/dsetup/fun/DirectXSetupGetVersion.hpp @@ -0,0 +1,13 @@ +#include + +/** + * @brief Get DirectX version + * + * @todo Implement this function + * * @see https://github.com/EduApps-CDG/OpenDX/wiki/dsetup.dll-or-libdsetup.so#int-directxsetupgetversiondword-dword + * + * @param ver + * @param rev + * @return int 1 (always?) + */ +int DirectXSetupGetVersion(DWORD* ver, DWORD* rev); \ No newline at end of file