src/video/winrt/SDL_winrtvideo_cpp.h
changeset 9931 0bb3dd1c95f2
parent 9924 355cccccc7dc
child 9998 f67cf37e9cd4
     1.1 --- a/src/video/winrt/SDL_winrtvideo_cpp.h	Thu Nov 26 13:51:03 2015 -0500
     1.2 +++ b/src/video/winrt/SDL_winrtvideo_cpp.h	Sun Nov 29 19:33:11 2015 -0500
     1.3 @@ -75,9 +75,9 @@
     1.4  #define WINRT_DISPLAY_PROPERTY(NAME) (Windows::Graphics::Display::DisplayProperties::NAME)
     1.5  #endif
     1.6  
     1.7 -/* Converts DIPS to physical pixels */
     1.8 -#define WINRT_DIPS_TO_PHYSICAL_PIXELS(DIPS) ((int)(0.5f + (((float)(DIPS) * (float)WINRT_DISPLAY_PROPERTY(LogicalDpi)) / 96.f)))
     1.9 -
    1.10 +/* Converts DIPS to/from physical pixels */
    1.11 +#define WINRT_DIPS_TO_PHYSICAL_PIXELS(DIPS)     ((int)(0.5f + (((float)(DIPS) * (float)WINRT_DISPLAY_PROPERTY(LogicalDpi)) / 96.f)))
    1.12 +#define WINRT_PHYSICAL_PIXELS_TO_DIPS(PHYSPIX)  (((float)(PHYSPIX) * 96.f)/WINRT_DISPLAY_PROPERTY(LogicalDpi))
    1.13  
    1.14  /* Internal window data */
    1.15  struct SDL_WindowData