@ -32,6 +32,7 @@
// CHANGELOG
// CHANGELOG
// (minor and older changes stripped away, please see git history for details)
// (minor and older changes stripped away, please see git history for details)
// 2020-12-04: Misc: Fixed setting of io.DisplaySize to invalid/uninitialized data when after hwnd has been closed.
// 2020-03-03: Inputs: Calling AddInputCharacterUTF16() to support surrogate pairs leading to codepoint >= 0x10000 (for more complete CJK inputs)
// 2020-03-03: Inputs: Calling AddInputCharacterUTF16() to support surrogate pairs leading to codepoint >= 0x10000 (for more complete CJK inputs)
// 2020-02-17: Added ImGui_ImplWin32_EnableDpiAwareness(), ImGui_ImplWin32_GetDpiScaleForHwnd(), ImGui_ImplWin32_GetDpiScaleForMonitor() helper functions.
// 2020-02-17: Added ImGui_ImplWin32_EnableDpiAwareness(), ImGui_ImplWin32_GetDpiScaleForHwnd(), ImGui_ImplWin32_GetDpiScaleForMonitor() helper functions.
// 2020-01-14: Inputs: Added support for #define IMGUI_IMPL_WIN32_DISABLE_GAMEPAD/IMGUI_IMPL_WIN32_DISABLE_LINKING_XINPUT.
// 2020-01-14: Inputs: Added support for #define IMGUI_IMPL_WIN32_DISABLE_GAMEPAD/IMGUI_IMPL_WIN32_DISABLE_LINKING_XINPUT.
@ -153,7 +154,7 @@ static void ImGui_ImplWin32_UpdateMousePos()
if ( io . WantSetMousePos )
if ( io . WantSetMousePos )
{
{
POINT pos = { ( int ) io . MousePos . x , ( int ) io . MousePos . y } ;
POINT pos = { ( int ) io . MousePos . x , ( int ) io . MousePos . y } ;
: : ClientToScreen ( g_hWnd , & pos ) ;
if ( : : ClientToScreen ( g_hWnd , & pos ) )
: : SetCursorPos ( pos . x , pos . y ) ;
: : SetCursorPos ( pos . x , pos . y ) ;
}
}
@ -221,12 +222,12 @@ void ImGui_ImplWin32_NewFrame()
IM_ASSERT ( io . Fonts - > IsBuilt ( ) & & " Font atlas not built! It is generally built by the renderer backend. Missing call to renderer _NewFrame() function? e.g. ImGui_ImplOpenGL3_NewFrame(). " ) ;
IM_ASSERT ( io . Fonts - > IsBuilt ( ) & & " Font atlas not built! It is generally built by the renderer backend. Missing call to renderer _NewFrame() function? e.g. ImGui_ImplOpenGL3_NewFrame(). " ) ;
// Setup display size (every frame to accommodate for window resizing)
// Setup display size (every frame to accommodate for window resizing)
RECT rect ;
RECT rect = { 0 , 0 , 0 , 0 } ;
: : GetClientRect ( g_hWnd , & rect ) ;
: : GetClientRect ( g_hWnd , & rect ) ;
io . DisplaySize = ImVec2 ( ( float ) ( rect . right - rect . left ) , ( float ) ( rect . bottom - rect . top ) ) ;
io . DisplaySize = ImVec2 ( ( float ) ( rect . right - rect . left ) , ( float ) ( rect . bottom - rect . top ) ) ;
// Setup time step
// Setup time step
INT64 current_time ;
INT64 current_time = 0 ;
: : QueryPerformanceCounter ( ( LARGE_INTEGER * ) & current_time ) ;
: : QueryPerformanceCounter ( ( LARGE_INTEGER * ) & current_time ) ;
io . DeltaTime = ( float ) ( current_time - g_Time ) / g_TicksPerSecond ;
io . DeltaTime = ( float ) ( current_time - g_Time ) / g_TicksPerSecond ;
g_Time = current_time ;
g_Time = current_time ;