From 8aabdb0975c3532324d299dfa62aa333a56d2d3b Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Mon, 24 Oct 2016 11:36:22 +0200 Subject: winrt: Fixup for 79697d9fb63a109eb8e5098c90fd287815deb12b Task-number: QTBUG-56340 Change-Id: I9a3876d413d0d93d9ad74332677ff0244fb2e00a Reviewed-by: Oliver Wolff --- src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp b/src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp index 37f404f9..a1cda7f6 100644 --- a/src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp +++ b/src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp @@ -491,8 +491,9 @@ HRESULT QGeoPositionInfoSourceWinRT::onPositionChanged(IGeolocator *locator, IPo if (SUCCEEDED(hr) && heading) { double value; hr = heading->get_Value(&value); - double mod = 360; + double mod = 0; value = modf(value, &mod); + value += static_cast(mod) % 360; if (value >=0 && value <= 359) // get_Value might return nan/-nan currentInfo.setAttribute(QGeoPositionInfo::Direction, value); } -- cgit v1.2.1