diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-03-18 19:13:16 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-03-18 19:13:16 +0100 |
commit | dc70bd27f217413bbda33b4092a3a52a6f1905d5 (patch) | |
tree | 15b8316a8f5ec0bfa01d92451ac2d56174b0a763 /src/gui/Utils.cpp | |
parent | 44e7f57d21680de28a5ccd7b6556697666061fe7 (diff) |
Add controller button icons in hotkeys, separate keyboard hotkeys and controller hotkeys
Diffstat (limited to 'src/gui/Utils.cpp')
-rw-r--r-- | src/gui/Utils.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/Utils.cpp b/src/gui/Utils.cpp index d1643f2..8f77f17 100644 --- a/src/gui/Utils.cpp +++ b/src/gui/Utils.cpp @@ -67,4 +67,11 @@ namespace gsr { return from; } + + mgl::vec2f clamp_keep_aspect_ratio(mgl::vec2f from, mgl::vec2f to) { + if(from.x > to.x || from.y > to.y) + return scale_keep_aspect_ratio(from, to); + else + return from; + } }
\ No newline at end of file |