DirectInput: ConfigureDevices()

Started by
0 comments, last by Julian Spillane 18 years, 1 month ago
Hey all, I've been working on implementing ActionMapping into my engine and everything's been working just wonderfully up until I've tried to implement key configuration using the ConfigureDevices function. I've browsed through all of the documentation (and am unable to find a copy of the old DX8 ActionMapper sample source code to look at :( ) and I've not been able to solve my problems. What happens is that the ConfigureDevices() function returns DIERR_INVALIDPARAM and I have no clue why. Here's my code:


void CFNIE::configureActions(DICOLORSET color, int numUsers)
{
	DICONFIGUREDEVICESPARAMS dicdp;
	ZeroMemory(&dicdp, sizeof(dicdp));
	
	dicdp.dwSize = sizeof(dicdp);
	dicdp.dics = color;
	dicdp.dwcUsers = 1;
	dicdp.lptszUserNames = "test\n\n";
	dicdp.dwcFormats = 1;
	dicdp.lprgFormats = &diaf
	dicdp.hwnd = m_hWnd;
	dicdp.lpUnkDDSTarget = NULL;

	if(m_lpDI->ConfigureDevices(NULL, &dicdp, DICD_DEFAULT, NULL) == DIERR_INVALIDPARAM)
		MessageBox(NULL, "ERROR!", "ERROR!", MB_OK);
}

In this case I'm running a windowed application. Any help would be appreciated. Thanks a lot!
Advertisement
Neeeeeeeeeeeeeevermind. I solved my problem.
A pointer went out of scope and I didn't catch it until just now. Hahaha.

Oh well. Thanks anyways!

This topic is closed to new replies.

Advertisement