summaryrefslogtreecommitdiff
path: root/uisimulator/win32/button.c
diff options
context:
space:
mode:
authorFelix Arends <edx@rockbox.org>2002-10-16 16:26:09 +0000
committerFelix Arends <edx@rockbox.org>2002-10-16 16:26:09 +0000
commit879fabdb1de9a08bb84720059e02783aa4f393c7 (patch)
tree490eb22af7110e6428374caae052db6d0bcf5684 /uisimulator/win32/button.c
parente45c069d6993137af80fac30ac1b701b3f669d91 (diff)
downloadrockbox-879fabdb1de9a08bb84720059e02783aa4f393c7.tar.gz
rockbox-879fabdb1de9a08bb84720059e02783aa4f393c7.zip
finally up-to-date: the win32 simulator (at least for the recorder)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2685 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/win32/button.c')
-rw-r--r--uisimulator/win32/button.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/uisimulator/win32/button.c b/uisimulator/win32/button.c
index 97a57a496a..7176cbc20c 100644
--- a/uisimulator/win32/button.c
+++ b/uisimulator/win32/button.c
@@ -53,6 +53,7 @@ int button_set_release(int newmask)
53static int real_button_get(void) 53static int real_button_get(void)
54{ 54{
55 int btn = 0; 55 int btn = 0;
56 Sleep (25);
56 57
57 if (bActive) 58 if (bActive)
58 { 59 {
@@ -111,10 +112,7 @@ int button_get(bool block)
111 112
112 btn = real_button_get(); 113 btn = real_button_get();
113 114
114 if(!btn) 115 if (btn)
115 /* prevent busy-looping */
116 Sleep (50); /* ms */
117 else
118 break; 116 break;
119 117
120 } while (block); 118 } while (block);
@@ -130,9 +128,9 @@ int button_get_w_tmo(int ticks)
130 128
131 if(!btn) 129 if(!btn)
132 /* prevent busy-looping */ 130 /* prevent busy-looping */
133 sleep(1); /* one tick! */ 131 sleep(10); /* one tick! */
134 else 132 else
135 break; 133 return btn;
136 134
137 } while (--ticks); 135 } while (--ticks);
138 136