From 4f5b381344519bf3c20e89756cd10244225b01ee Mon Sep 17 00:00:00 2001 From: pavelyakov Date: Sat, 15 Sep 2018 12:29:14 +0000 Subject: [PATCH] Fixed error checkbox and optimized if git-svn-id: svn://kolibrios.org@7371 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/mousecfg/mousecfg.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/programs/cmm/mousecfg/mousecfg.c b/programs/cmm/mousecfg/mousecfg.c index 9444394d36..c3b645e41b 100644 --- a/programs/cmm/mousecfg/mousecfg.c +++ b/programs/cmm/mousecfg/mousecfg.c @@ -80,17 +80,19 @@ void main() { case evButton: id = GetButtonID(); - if (1==id) ExitApp(); - if (pointer_speed.click(id)) ApplyCfg();; - if (acceleration.click(id)) ApplyCfg();; - if (double_click_delay.click(id)) ApplyCfg();; - if (emulation.click(id)) { - if (emulation.checked==true) KillProcessByName("mousemul", SINGLE); - else RunProgram("/sys/mousemul", 0); + if (id == 1) ExitApp(); + else if (pointer_speed.click(id)) ApplyCfg(); + else if (acceleration.click(id)) ApplyCfg(); + else if (double_click_delay.click(id)) ApplyCfg(); + else if (emulation.click(id)) { + if (emulation.checked == true) RunProgram("/sys/mousemul", 0); + else KillProcessByName("mousemul", SINGLE); + break; } - if (madmouse.click(id)) { - if (madmouse.checked==true) KillProcessByName("madmouse", SINGLE); - else RunProgram("/sys/madmouse", 0); + else if (madmouse.click(id)) { + if (madmouse.checked == true) RunProgram("/sys/madmouse", 0); + else KillProcessByName("madmouse", SINGLE); + break; } break;