1
0
mirror of https://github.com/djhackersdev/bemanitools.git synced 2025-01-31 12:13:42 +01:00

dinput/asio: drop hook suffix

This commit is contained in:
Will Xyen 2020-04-05 02:18:24 -07:00
parent 937290f93d
commit 25413bcba8
12 changed files with 50 additions and 20 deletions

View File

@ -77,7 +77,7 @@ imps += avs avs-ea3
include src/main/aciodrv/Module.mk
include src/main/acioemu/Module.mk
include src/main/aciotest/Module.mk
include src/main/asiohook/Module.mk
include src/main/asio/Module.mk
include src/main/bio2emu/Module.mk
include src/main/bsthook/Module.mk
include src/main/bstio/Module.mk
@ -89,7 +89,7 @@ include src/main/ddrhook/Module.mk
include src/main/ddrio/Module.mk
include src/main/ddrio-smx/Module.mk
include src/main/ddrio-mm/Module.mk
include src/main/dinputhook/Module.mk
include src/main/dinput/Module.mk
include src/main/eamio/Module.mk
include src/main/eamio-icca/Module.mk
include src/main/eamiotest/Module.mk

View File

@ -1,10 +1,10 @@
libs += asiohook
libs += asio
libs_asiohook := \
libs_asio := \
hook \
hooklib \
util \
src_asiohook := \
src_asio := \
asio-reghook.c \
config-asio.c \

View File

@ -13,7 +13,7 @@
#include "hook/com-proxy.h"
#include "hook/table.h"
#include "asiohook/asio-reghook.h"
#include "asio/asio-reghook.h"
#include "util/defs.h"
#include "util/log.h"

View File

@ -1,6 +1,6 @@
#include "cconfig/cconfig-util.h"
#include "asiohook/config-asio.h"
#include "asio/config-asio.h"
#include "util/log.h"

10
src/main/dinput/Module.mk Normal file
View File

@ -0,0 +1,10 @@
libs += dinput
libs_dinput := \
hook \
hooklib \
util \
src_dinput := \
dinput.c \
device_dinput8.c \

View File

@ -1,4 +1,4 @@
#include "dinputhook/device_dinput8.h"
#include "dinput/device_dinput8.h"
static ULONG REF_COUNT = 0;
@ -26,11 +26,13 @@ static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_QueryInterface(
return E_NOINTERFACE;
}
static ULONG STDMETHODCALLTYPE
IDirectInputDevice8W_AddRef(IDirectInputDevice8W FAR *This)
{
return ++REF_COUNT;
}
static ULONG STDMETHODCALLTYPE
IDirectInputDevice8W_Release(IDirectInputDevice8W FAR *This)
{
@ -42,6 +44,7 @@ static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_GetCapabilities(
{
return DIERR_INVALIDPARAM;
}
static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_EnumObjects(
IDirectInputDevice8W FAR *This,
LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback,
@ -50,31 +53,37 @@ static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_EnumObjects(
{
return DIERR_INVALIDPARAM;
}
static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_GetProperty(
IDirectInputDevice8W FAR *This, REFGUID rguidProp, LPDIPROPHEADER pdiph)
{
return DIERR_INVALIDPARAM;
}
static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_SetProperty(
IDirectInputDevice8W FAR *This, REFGUID rguidProp, LPCDIPROPHEADER pdiph)
{
return DI_OK;
}
static HRESULT STDMETHODCALLTYPE
IDirectInputDevice8W_Acquire(IDirectInputDevice8W FAR *This)
{
return DIERR_INVALIDPARAM;
}
static HRESULT STDMETHODCALLTYPE
IDirectInputDevice8W_Unacquire(IDirectInputDevice8W FAR *This)
{
return DIERR_INVALIDPARAM;
}
static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_GetDeviceState(
IDirectInputDevice8W FAR *This, DWORD cbData, LPVOID lpvData)
{
return DIERR_INVALIDPARAM;
}
static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_GetDeviceData(
IDirectInputDevice8W FAR *This,
DWORD cbObjectData,
@ -84,21 +93,25 @@ static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_GetDeviceData(
{
return DIERR_INVALIDPARAM;
}
static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_SetDataFormat(
IDirectInputDevice8W FAR *This, LPCDIDATAFORMAT lpdf)
{
return DI_OK;
}
static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_SetEventNotification(
IDirectInputDevice8W FAR *This, HANDLE hEvent)
{
return DIERR_INVALIDPARAM;
}
static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_SetCooperativeLevel(
IDirectInputDevice8W FAR *This, HWND hWnd, DWORD dwFlags)
{
return DI_OK;
}
static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_GetObjectInfo(
IDirectInputDevice8W FAR *This,
LPDIDEVICEOBJECTINSTANCEW pdidoi,
@ -107,16 +120,19 @@ static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_GetObjectInfo(
{
return DIERR_INVALIDPARAM;
}
static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_GetDeviceInfo(
IDirectInputDevice8W FAR *This, LPDIDEVICEINSTANCEW pdidi)
{
return DIERR_INVALIDPARAM;
}
static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_RunControlPanel(
IDirectInputDevice8W FAR *This, HWND hwndOwner, DWORD dwFlags)
{
return DIERR_INVALIDPARAM;
}
static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_Initialize(
IDirectInputDevice8W FAR *This,
HINSTANCE hinst,
@ -135,6 +151,7 @@ static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_CreateEffect(
{
return DIERR_INVALIDPARAM;
}
static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_EnumEffects(
IDirectInputDevice8W FAR *This,
LPDIENUMEFFECTSCALLBACKW lpCallback,
@ -143,21 +160,25 @@ static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_EnumEffects(
{
return DIERR_INVALIDPARAM;
}
static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_GetEffectInfo(
IDirectInputDevice8W FAR *This, LPDIEFFECTINFOW pdei, REFGUID rguid)
{
return DIERR_INVALIDPARAM;
}
static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_GetForceFeedbackState(
IDirectInputDevice8W FAR *This, LPDWORD pdwOut)
{
return DIERR_INVALIDPARAM;
}
static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_SendForceFeedbackCommand(
IDirectInputDevice8W FAR *This, DWORD dwFlags)
{
return DIERR_INVALIDPARAM;
}
static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_EnumCreatedEffectObjects(
IDirectInputDevice8W FAR *This,
LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback,
@ -166,16 +187,19 @@ static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_EnumCreatedEffectObjects(
{
return DIERR_INVALIDPARAM;
}
static HRESULT STDMETHODCALLTYPE
IDirectInputDevice8W_Escape(IDirectInputDevice8W FAR *This, LPDIEFFESCAPE pesc)
{
return DIERR_INVALIDPARAM;
}
static HRESULT STDMETHODCALLTYPE
IDirectInputDevice8W_Poll(IDirectInputDevice8W FAR *This)
{
return DIERR_INVALIDPARAM;
}
static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_SendDeviceData(
IDirectInputDevice8W FAR *This,
DWORD cbObjectData,
@ -195,6 +219,7 @@ static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_EnumEffectsInFile(
{
return DIERR_INVALIDPARAM;
}
static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_WriteEffectToFile(
IDirectInputDevice8W FAR *This,
LPCWSTR lpszFileName,
@ -213,6 +238,7 @@ static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_BuildActionMap(
{
return DIERR_INVALIDPARAM;
}
static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_SetActionMap(
IDirectInputDevice8W FAR *This,
LPDIACTIONFORMATW lpdiaf,
@ -221,6 +247,7 @@ static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_SetActionMap(
{
return DIERR_INVALIDPARAM;
}
static HRESULT STDMETHODCALLTYPE IDirectInputDevice8W_GetImageInfo(
IDirectInputDevice8W FAR *This,
LPDIDEVICEIMAGEINFOHEADERW lpdiDevImageInfoHeader)

View File

@ -3,8 +3,8 @@
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#include "dinputhook/device_dinput8.h"
#include "dinputhook/dinput.h"
#include "dinput/device_dinput8.h"
#include "dinput/dinput.h"
#include <stdbool.h>
@ -44,6 +44,7 @@ static HRESULT STDCALL my_CreateDevice(
LPUNKNOWN pUnkOuter)
{
log_misc("IDirectInput8::CreateDevice hook hit");
if (lplpDirectInputDevice == NULL) {
return DIERR_INVALIDPARAM;
}
@ -89,9 +90,11 @@ static HRESULT STDCALL my_DirectInput8Create(
res = real_DirectInput8Create(
hinst, dwVersion, riidltf, (LPVOID *) &api, punkOuter);
if (res != DI_OK) {
return res;
}
api_proxy = com_proxy_wrap(api, sizeof(*api->lpVtbl));
api_vtbl = api_proxy->vptr;

View File

@ -1,10 +0,0 @@
libs += dinputhook
libs_dinputhook := \
hook \
hooklib \
util \
src_dinputhook := \
dinput.c \
device_dinput8.c \