Example #1
0
		WinMM.JOYINFOEX GetJoyInfoEx()
		{
			WinMM.JOYINFOEX joyInfoEx = new WinMM.JOYINFOEX();

			joyInfoEx.dwSize = 64;
			joyInfoEx.dwFlags = 0x2ff;

			WinMM.joyGetPosEx(ID, ref joyInfoEx);

			// Center if not available!
			if (!HasPOV) joyInfoEx.dwPOV = WinMM.JOY_POVCENTERED;
			if (!HasZ) joyInfoEx.dwZpos = 0x7fff;
			if (!HasR) joyInfoEx.dwRpos = 0x7fff;
			if (!HasU) joyInfoEx.dwUpos = 0x7fff;
			if (!HasV) joyInfoEx.dwVpos = 0x7fff;

			return joyInfoEx;
		}