예제 #1
0
bool directinput::SetCoopLevel(LPDIRECTINPUTDEVICE7 device, HWND window, bool allowBackgroundAccess) {
	IDirectInputDevice7_Unacquire(device);
	DWORD flags = DISCL_NONEXCLUSIVE | ((allowBackgroundAccess)? DISCL_BACKGROUND:DISCL_FOREGROUND);
	return (DI_OK == IDirectInputDevice7_SetCooperativeLevel(device, window, flags));
}
예제 #2
0
void KeyboardClose(void) {
	if (lpdid) IDirectInputDevice7_Unacquire(lpdid);
	lpdid = 0;
}
예제 #3
0
void directinput::DestroyDevice(LPDIRECTINPUTDEVICE7 device) {
	if(device != NULL) {
		IDirectInputDevice7_Unacquire(device);
		IDirectInputDevice7_Release(device);
	}
}