Sign in to follow this  
Julian Spillane

DirectInput: ConfigureDevices()

Recommended Posts

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!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this