From e9ce3f02d85abb1321f51015b354b48a7a69f528 Mon Sep 17 00:00:00 2001 From: "Eduardo P. Gomez" Date: Wed, 26 Jul 2023 05:54:32 -0300 Subject: [PATCH] Added DSETUP Changes: modified: CMakeLists.txt new file: libs/dsetup/README.md new file: libs/dsetup/dsetup.cpp new file: libs/dsetup/dsetup.hpp new file: libs/dsetup/fun/DirectXSetupGetVersion.cpp new file: libs/dsetup/fun/DirectXSetupGetVersion.hpp --- CMakeLists.txt | 11 ++++++++++- libs/dsetup/README.md | 2 ++ libs/dsetup/dsetup.cpp | 1 + libs/dsetup/dsetup.hpp | 1 + libs/dsetup/fun/DirectXSetupGetVersion.cpp | 17 +++++++++++++++++ libs/dsetup/fun/DirectXSetupGetVersion.hpp | 13 +++++++++++++ 6 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 libs/dsetup/README.md create mode 100644 libs/dsetup/dsetup.cpp create mode 100644 libs/dsetup/dsetup.hpp create mode 100644 libs/dsetup/fun/DirectXSetupGetVersion.cpp create mode 100644 libs/dsetup/fun/DirectXSetupGetVersion.hpp 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