Jump to content
  • Advertisement
Sign in to follow this  
Julian Spillane

DirectInput: ConfigureDevices()

This topic is 4485 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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)
	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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!