mirror of https://github.com/bkaradzic/bgfx
Fix compilation of example entry_winrt.cx on VS2017.
This commit is contained in:
parent
5ee5b99216
commit
26c2aa0e2d
|
@ -11,6 +11,7 @@
|
||||||
#include <bx/thread.h>
|
#include <bx/thread.h>
|
||||||
#include <bx/math.h>
|
#include <bx/math.h>
|
||||||
#include <Unknwn.h>
|
#include <Unknwn.h>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
using namespace Windows::ApplicationModel;
|
using namespace Windows::ApplicationModel;
|
||||||
using namespace Windows::ApplicationModel::Core;
|
using namespace Windows::ApplicationModel::Core;
|
||||||
|
@ -91,8 +92,8 @@ public:
|
||||||
auto dpi = DisplayInformation::GetForCurrentView()->LogicalDpi;
|
auto dpi = DisplayInformation::GetForCurrentView()->LogicalDpi;
|
||||||
static const float dipsPerInch = 96.0f;
|
static const float dipsPerInch = 96.0f;
|
||||||
g_eventQueue.postSizeEvent(g_defaultWindow
|
g_eventQueue.postSizeEvent(g_defaultWindow
|
||||||
, lround(bx::floor(bounds.Width * dpi / dipsPerInch + 0.5f) )
|
, std::lround(bx::floor(bounds.Width * dpi / dipsPerInch + 0.5f) )
|
||||||
, lround(bx::floor(bounds.Height * dpi / dipsPerInch + 0.5f) )
|
, std::lround(bx::floor(bounds.Height * dpi / dipsPerInch + 0.5f) )
|
||||||
);
|
);
|
||||||
#endif // BX_PLATFORM_WINRT
|
#endif // BX_PLATFORM_WINRT
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue