Changeset 588 for trunk/src/winmm/winmm.cpp
- Timestamp:
- Aug 19, 1999, 8:46:54 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/winmm/winmm.cpp
r95 r588 1 /* $Id: winmm.cpp,v 1. 3 1999-06-10 16:24:35 phaller Exp $ */1 /* $Id: winmm.cpp,v 1.4 1999-08-19 18:46:05 phaller Exp $ */ 2 2 3 3 /* … … 10 10 * 11 11 */ 12 13 14 /**************************************************************************** 15 * Includes * 16 ****************************************************************************/ 17 12 18 #include <os2win.h> 19 #include <odinwrap.h> 13 20 #include "misc.h" 14 21 15 22 #include "os2timer.h" 16 23 24 ODINDEBUGCHANNEL(WINMM-WINMM) 25 26 17 27 /******************************************************************************/ 18 UINT WIN32API mmsystemGetVersion(void)28 ODINFUNCTION0(UINT, mmsystemGetVersion) 19 29 { 20 dprintf(("WINMM:mmsystemGetVersion\n"));21 30 return 4; 22 31 } 23 32 24 33 /******************************************************************************/ 25 MMRESULT WIN32API timeGetDevCaps(LPTIMECAPS ptc, UINT cbtc) 34 ODINFUNCTION2(MMRESULT, timeGetDevCaps, 35 LPTIMECAPS, ptc, 36 UINT, cbtc) 26 37 { 27 28 29 30 38 dprintf(("WINMM:timeGetDevCaps Not really Implemented\n")); 39 ptc->wPeriodMin = 1; 40 ptc->wPeriodMax = 20; 41 return TIMERR_NOERROR; 31 42 } 32 43 33 44 /******************************************************************************/ 34 MMRESULT WIN32API timeBeginPeriod(UINT cMilliseconds) 45 ODINFUNCTION1(MMRESULT, timeBeginPeriod, 46 UINT, cMilliseconds) 35 47 { 36 dprintf(("WINMM:timeBeginPeriod %d ms\n", cMilliseconds));37 48 dprintf(("WINMM: timeBeginPeriod not implemented.\n")); 49 return TIMERR_NOERROR; 38 50 } 39 51 /******************************************************************************/ 40 52 /******************************************************************************/ 41 MMRESULT WIN32API timeEndPeriod(UINT cMilliseconds) 53 ODINFUNCTION1(MMRESULT, timeEndPeriod, 54 UINT, cMilliseconds) 42 55 { 43 dprintf(("WINMM:timeEndPeriod %d ms\n", cMilliseconds));44 56 dprintf(("WINMM: timeEndPeriod not implemented.\n")); 57 return TIMERR_NOERROR; 45 58 } 46 59 /******************************************************************************/ 47 60 /******************************************************************************/ 48 MMRESULT WIN32API timeKillEvent(UINT IDEvent) 61 ODINFUNCTION1(MMRESULT, timeKillEvent, 62 UINT, IDEvent) 49 63 { 50 51 52 64 dprintf(("WINMM:timeKillEvent Not Implemented\n")); 65 delete((OS2Timer *)IDEvent); 66 return TIMERR_NOERROR; 53 67 } 54 68 /******************************************************************************/ 55 69 /******************************************************************************/ 56 MMRESULT WIN32API timeSetEvent(UINT wDelay, UINT wResolution, LPTIMECALLBACK lptc, 57 DWORD dwUser, UINT fuEvent) 70 ODINFUNCTION5(MMRESULT, timeSetEvent, 71 UINT, wDelay, 72 UINT, wResolution, 73 LPTIMECALLBACK, lptc, 74 DWORD, dwUser, 75 UINT, fuEvent) 58 76 { 59 OS2Timer *timer;77 OS2Timer *timer; 60 78 61 dprintf(("WINMM:timeSetEvent %d\n", wDelay)); 79 timer = new OS2Timer(); 80 if(timer == NULL) 81 return(0); 62 82 63 timer = new OS2Timer(); 64 if(timer == NULL) { 65 return(0); 66 } 67 if(timer->StartTimer(wDelay, wResolution, lptc, dwUser, fuEvent) == FALSE) { 68 dprintf(("WINMM:timeSetEvent: couldn't start timer!\n")); 69 delete(timer); 70 return(0); 71 } 72 return(MMRESULT)timer; 83 if(timer->StartTimer(wDelay, wResolution, lptc, dwUser, fuEvent) == FALSE) 84 { 85 dprintf(("WINMM:timeSetEvent: couldn't start timer!\n")); 86 delete(timer); 87 return(0); 88 } 89 return(MMRESULT)timer; 73 90 } 74 91 75 92 /******************************************************************************/ 76 MMRESULT WIN32API timeGetSystemTime( LPMMTIME arg1, UINT arg2) 93 ODINFUNCTION2(MMRESULT, timeGetSystemTime, 94 LPMMTIME, arg1, 95 UINT, arg2) 77 96 { 78 dprintf(("WINMM:timeGetSystemTime\n")); 79 return O32_timeGetSystemTime(arg1, arg2); 97 return O32_timeGetSystemTime(arg1, arg2); 80 98 } 99
Note:
See TracChangeset
for help on using the changeset viewer.