mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-12-05 19:16:42 -08: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:
1 parent
603fbfc69d
commit
4c77a3f148
17 files changed
+1095
-15
No files matched your search
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "avs/game.h"
|
||||
#include "hooks/graphics/graphics.h"
|
||||
#include "sdk/d3d9.h"
|
||||
|
||||
#include "d3d9_backend.h"
|
||||
#include "d3d9_device.h"
|
||||
@@ -140,6 +141,9 @@ HRESULT STDMETHODCALLTYPE WrappedIDirect3DSwapChain9::Present(const RECT *pSourc
|
||||
result = recovery_failure;
|
||||
}
|
||||
}
|
||||
if (should_run_hooks) {
|
||||
sdk::d3d9::present_complete(pDev->pReal, result);
|
||||
}
|
||||
CHECK_RESULT(result);
|
||||
}
|
||||
HRESULT STDMETHODCALLTYPE WrappedIDirect3DSwapChain9::GetFrontBufferData(IDirect3DSurface9 *pDestSurface) {
|
||||
|
||||
Reference in new issue
Block a user