mirror of
https://github.com/ocornut/imgui.git
synced 2025-09-07 11:58:22 +00:00
Backends: Allegro5: fixed missing support for ImGuiKey_PrintScreen under Windows.
This commit is contained in:
@@ -21,6 +21,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)
|
||||||
|
// 2025-08-12: Inputs: fixed missing support for ImGuiKey_PrintScreen under Windows, as raw Allegro 5 does not receive it.
|
||||||
// 2025-08-12: Added ImGui_ImplAllegro5_SetDisplay() function to change current ALLEGRO_DISPLAY, as Allegro applications often need to do that.
|
// 2025-08-12: Added ImGui_ImplAllegro5_SetDisplay() function to change current ALLEGRO_DISPLAY, as Allegro applications often need to do that.
|
||||||
// 2025-07-07: Fixed texture update broken on some platforms where ALLEGRO_LOCK_WRITEONLY needed all texels to be rewritten.
|
// 2025-07-07: Fixed texture update broken on some platforms where ALLEGRO_LOCK_WRITEONLY needed all texels to be rewritten.
|
||||||
// 2025-06-11: Added support for ImGuiBackendFlags_RendererHasTextures, for dynamic font atlas. Removed ImGui_ImplSDLGPU3_CreateFontsTexture() and ImGui_ImplSDLGPU3_DestroyFontsTexture().
|
// 2025-06-11: Added support for ImGuiBackendFlags_RendererHasTextures, for dynamic font atlas. Removed ImGui_ImplSDLGPU3_CreateFontsTexture() and ImGui_ImplSDLGPU3_DestroyFontsTexture().
|
||||||
@@ -679,6 +680,11 @@ void ImGui_ImplAllegro5_NewFrame()
|
|||||||
io.DeltaTime = bd->Time > 0.0 ? (float)(current_time - bd->Time) : (float)(1.0f / 60.0f);
|
io.DeltaTime = bd->Time > 0.0 ? (float)(current_time - bd->Time) : (float)(1.0f / 60.0f);
|
||||||
bd->Time = current_time;
|
bd->Time = current_time;
|
||||||
|
|
||||||
|
// Allegro 5 doesn't receive PrintScreen under Windows
|
||||||
|
#ifdef _WIN32
|
||||||
|
io.AddKeyEvent(ImGuiKey_PrintScreen, (::GetAsyncKeyState(VK_SNAPSHOT) & 0x8000) != 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Setup mouse cursor shape
|
// Setup mouse cursor shape
|
||||||
ImGui_ImplAllegro5_UpdateMouseCursor();
|
ImGui_ImplAllegro5_UpdateMouseCursor();
|
||||||
}
|
}
|
||||||
|
@@ -47,6 +47,8 @@ Other Changes:
|
|||||||
setups/drivers. (#8770, #8465)
|
setups/drivers. (#8770, #8465)
|
||||||
- Backends: Allegro5: Added ImGui_ImplAllegro5_SetDisplay() function to
|
- Backends: Allegro5: Added ImGui_ImplAllegro5_SetDisplay() function to
|
||||||
change current ALLEGRO_DISPLAY, as Allegro applications often need to do that.
|
change current ALLEGRO_DISPLAY, as Allegro applications often need to do that.
|
||||||
|
- Backends: Allegro5: Fixed missing support for ImGuiKey_PrintScreen
|
||||||
|
under Windows, as raw Allegro 5 does not receive it.
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user