diff options
Diffstat (limited to 'uisimulator/win32/button.c')
-rw-r--r-- | uisimulator/win32/button.c | 10 |
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) | |||
53 | static int real_button_get(void) | 53 | static 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 | ||