summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>1999-03-25 13:32:52 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>1999-03-25 13:32:52 +0000
commit5df541f4f8a19517140e49f7432ed3927268a3d7 (patch)
tree3de6fd71b53dd1a13741cb1147105ca6f31b52c3 /src
parent2eafe965c949ccbc8c992e1f978298dff63113ae (diff)
Applied Dmitry's timeout patch.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@455 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_win32.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index f989a4233..bb7e1b415 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_win32.cxx,v 1.33.2.1 1999/03/18 20:04:13 bill Exp $"
+// "$Id: Fl_win32.cxx,v 1.33.2.2 1999/03/25 13:32:52 mike Exp $"
//
// WIN32-specific code for the Fast Light Tool Kit (FLTK).
//
@@ -143,8 +143,10 @@ double fl_wait(int timeout_flag, double time) {
GetMessage(&fl_msg, NULL, 0, 0);
have_message = 1;
} else {
- if (time >= 0.001) {
- int timerid = SetTimer(NULL, 0, int(time*1000), NULL);
+ if (time >= 0.0) {
+ int t = (int)(time * 1000.0);
+ if (t <= 0) t = 1;
+ int timerid = SetTimer(NULL, 0, t, NULL);
GetMessage(&fl_msg, NULL, 0, 0);
KillTimer(NULL, timerid);
have_message = 1;
@@ -917,5 +919,5 @@ void Fl_Window::make_current() {
}
//
-// End of "$Id: Fl_win32.cxx,v 1.33.2.1 1999/03/18 20:04:13 bill Exp $".
+// End of "$Id: Fl_win32.cxx,v 1.33.2.2 1999/03/25 13:32:52 mike Exp $".
//