setDataFormat(DIDF_ABSAXIS);
boolean all_relative = true; for (int i = 0; i < objects.size(); i++) { DIDeviceObject obj = (DIDeviceObject)objects.get(i); if (obj.isAxis() && !obj.isRelative()) { all_relative = false; break; } } this.axes_in_relative_mode = all_relative; int axis_mode = all_relative ? DIDF_RELAXIS : DIDF_ABSAXIS; setDataFormat(axis_mode);
	public IDirectInputDevice(DummyWindow window, long address, byte[] instance_guid, byte[] product_guid, int dev_type, int dev_subtype, String instance_name, String product_name) throws IOException {		this.window = window;		this.address = address;		this.product_name = product_name;		this.instance_name = instance_name;		this.dev_type = dev_type;		this.dev_subtype = dev_subtype;		// Assume that the caller (native side) releases the device if setup fails		enumObjects();		try {			enumEffects();			createRumblers();		} catch (IOException e) {			ControllerEnvironment.logln("Failed to create rumblers: " + e.getMessage());		}		/* Some DirectInput lamer-designer made the device state		 * axis mode be per-device not per-axis, so I'll just		 * get all axes as absolute and compensate for relative axes		 */		setDataFormat(DIDF_ABSAXIS);		if (rumblers.size() > 0) {			try {				setCooperativeLevel(DISCL_BACKGROUND | DISCL_EXCLUSIVE);			} catch (IOException e) {				setCooperativeLevel(DISCL_BACKGROUND | DISCL_NONEXCLUSIVE);			}		} else			setCooperativeLevel(DISCL_BACKGROUND | DISCL_NONEXCLUSIVE);		setBufferSize(AbstractController.EVENT_QUEUE_DEPTH);		acquire();		this.device_state = new int[objects.size()];	}