Ignore:
Timestamp:
Aug 31, 1999, 5:39:21 PM (26 years ago)
Author:
phaller
Message:

Fix: minimum and maximum resolution supported

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/winmm/time.cpp

    r756 r757  
    1 /* $Id: time.cpp,v 1.1 1999-08-31 15:04:11 phaller Exp $ */
     1/* $Id: time.cpp,v 1.2 1999-08-31 15:39:21 phaller Exp $ */
    22
    33/*
     
    6464  dprintf(("WINMM:timeGetDevCaps Not really Implemented\n"));
    6565
    66   ptc->wPeriodMin = 1;
    67   ptc->wPeriodMax = 20;
     66  ptc->wPeriodMin = OS2TIMER_RESOLUTION_MINIMUM;
     67  ptc->wPeriodMax = OS2TIMER_RESOLUTION_MAXIMUM;
    6868
    6969  return TIMERR_NOERROR;
     
    163163  OS2Timer *timer;
    164164
     165  // check parameters
     166  if ((wDelay < OS2TIMER_RESOLUTION_MINIMUM) ||
     167      (wDelay > OS2TIMER_RESOLUTION_MINIMUM))
     168    return NULL;
     169
     170   if (wResolution == 0)
     171     wResolution = OS2TIMER_RESOLUTION_MINIMUM;
     172   else
     173     if ((wResolution < OS2TIMER_RESOLUTION_MINIMUM) ||
     174         (wResolution > OS2TIMER_RESOLUTION_MINIMUM))
     175      return NULL;
     176
    165177  timer = new OS2Timer();
    166178  if(timer == NULL)
Note: See TracChangeset for help on using the changeset viewer.