Commit 54751b23 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Use round() instead of ceil() in wodGetPosition(TIME_SMPTE).

Fixes the corresponding winmm conformance test.
parent 3ce9c5f4
......@@ -1873,7 +1873,7 @@ static DWORD wodGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
time -= lpTime->u.smpte.min * 60;
lpTime->u.smpte.sec = time;
time -= lpTime->u.smpte.sec;
lpTime->u.smpte.frame = ceil(time * 30);
lpTime->u.smpte.frame = round(time * 30);
lpTime->u.smpte.fps = 30;
TRACE("TIME_SMPTE=%02u:%02u:%02u:%02u\n",
lpTime->u.smpte.hour, lpTime->u.smpte.min,
......
......@@ -38,6 +38,7 @@
/*#define EMULATE_SB16*/
#include "config.h"
#include "wine/port.h"
#include <math.h>
#include <stdlib.h>
......@@ -1427,7 +1428,7 @@ static DWORD wodGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
time -= lpTime->u.smpte.min * 60;
lpTime->u.smpte.sec = time;
time -= lpTime->u.smpte.sec;
lpTime->u.smpte.frame = ceil(time * 30);
lpTime->u.smpte.frame = round(time * 30);
lpTime->u.smpte.fps = 30;
TRACE("TIME_SMPTE=%02u:%02u:%02u:%02u\n",
lpTime->u.smpte.hour, lpTime->u.smpte.min,
......
......@@ -1121,7 +1121,7 @@ static DWORD wodGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
time -= lpTime->u.smpte.min * 60;
lpTime->u.smpte.sec = time;
time -= lpTime->u.smpte.sec;
lpTime->u.smpte.frame = ceil(time * 30);
lpTime->u.smpte.frame = round(time * 30);
lpTime->u.smpte.fps = 30;
TRACE("TIME_SMPTE=%02u:%02u:%02u:%02u\n",
lpTime->u.smpte.hour, lpTime->u.smpte.min,
......
......@@ -1591,7 +1591,7 @@ static DWORD wodGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
time -= lpTime->u.smpte.min * 60;
lpTime->u.smpte.sec = time;
time -= lpTime->u.smpte.sec;
lpTime->u.smpte.frame = ceil(time * 30);
lpTime->u.smpte.frame = round(time * 30);
lpTime->u.smpte.fps = 30;
TRACE("TIME_SMPTE=%02u:%02u:%02u:%02u\n",
lpTime->u.smpte.hour, lpTime->u.smpte.min,
......
......@@ -1165,7 +1165,7 @@ static DWORD wodGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
time -= lpTime->u.smpte.min * 60;
lpTime->u.smpte.sec = time;
time -= lpTime->u.smpte.sec;
lpTime->u.smpte.frame = ceil(time * 30);
lpTime->u.smpte.frame = round(time * 30);
lpTime->u.smpte.fps = 30;
TRACE("TIME_SMPTE=%02u:%02u:%02u:%02u\n",
lpTime->u.smpte.hour, lpTime->u.smpte.min,
......
......@@ -2123,7 +2123,7 @@ static DWORD wodGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
time -= lpTime->u.smpte.min * 60;
lpTime->u.smpte.sec = time;
time -= lpTime->u.smpte.sec;
lpTime->u.smpte.frame = ceil(time * 30);
lpTime->u.smpte.frame = round(time * 30);
lpTime->u.smpte.fps = 30;
TRACE("TIME_SMPTE=%02u:%02u:%02u:%02u\n",
lpTime->u.smpte.hour, lpTime->u.smpte.min,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment