Support for setting all screen orientations (#1928)

* Support for setting all screen orientations
* Gui: add flipped orientation to view
* Gui: correct assert conditions in gui_add_view_port

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
Vasyl "vk" Kaigorodov
2022-10-26 20:35:49 +02:00
committed by GitHub
parent a8edb41eae
commit ebaa84b0c2
7 changed files with 112 additions and 17 deletions

View File

@@ -322,7 +322,9 @@ void gui_add_view_port(Gui* gui, ViewPort* view_port, GuiLayer layer) {
furi_check(layer < GuiLayerMAX);
// Only fullscreen supports Vertical orientation for now
furi_assert(
(layer == GuiLayerFullscreen) || (view_port->orientation != ViewPortOrientationVertical));
(layer == GuiLayerFullscreen) ||
((view_port->orientation != ViewPortOrientationVertical) &&
(view_port->orientation != ViewPortOrientationVerticalFlip)));
gui_lock(gui);
// Verify that view port is not yet added