Touch Option: save touch type when touch point is 0
authorjihye424.kim <jihye424.kim@samsung.com>
Mon, 27 Jul 2015 06:31:20 +0000 (15:31 +0900)
committerjihye424.kim <jihye424.kim@samsung.com>
Mon, 27 Jul 2015 06:31:20 +0000 (15:31 +0900)
Change-Id: Ic82c74b31b599b9c604962da94038a8ae628aa50
Signed-off-by: jihye424.kim <jihye424.kim@samsung.com>
src/org/tizen/emulator/manager/vms/Creator.java
src/org/tizen/emulator/manager/vms/option/TouchPointOption.java

index 8e47a82..327dc79 100644 (file)
@@ -362,7 +362,7 @@ public class Creator {
                ec.getDevice().getRAM().getSize().setUnit("MiB"); //$NON-NLS-1$
                ec.getDevice().getRAM().getSize().setValue(newVM.ramSize);
 
-               if (newVM.maxTouchCount > 0) {
+               if (newVM.maxTouchCount >= 0) {
                        ec.getDevice().setTouch(factory.createTouchType());
                        ec.getDevice().getTouch().setMaxTouchPoint(newVM.maxTouchCount);
                }
index 9134d74..c6a62e1 100644 (file)
@@ -37,7 +37,7 @@ public class TouchPointOption extends Option {
        public void getLaunchArgument(LaunchConfig config, VMProperty property) {
                TouchType touchType = property.getConfiguration().getDevice()
                                .getTouch();
-               if (touchType != null) {
+               if (touchType != null && touchType.getMaxTouchPoint() > 0) {
                        config.addVariable(OPTION_KEY.VAR_MAX_POINT,
                                        String.valueOf(touchType.getMaxTouchPoint()));
                        config.addQemuOption("-device", "virtio-touchscreen-pci,max_point=" //$NON-NLS-1$ //$NON-NLS-2$