Fix orientation issues.

This commit is contained in:
fewtarius 2024-01-30 13:07:56 +00:00
parent 4f75b16b88
commit 7443ee1b98
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A
3 changed files with 3 additions and 8 deletions

View file

@ -21,9 +21,9 @@ index 319e3f0e3..e17e97e8e 100644
+enum drm_panel_orientation {
+ DRM_MODE_PANEL_ORIENTATION_UNKNOWN = -1,
+ DRM_MODE_PANEL_ORIENTATION_NORMAL = 0,
+ DRM_MODE_PANEL_ORIENTATION_BOTTOM_UP,
+ DRM_MODE_PANEL_ORIENTATION_LEFT_UP,
+ DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
+ DRM_MODE_PANEL_ORIENTATION_BOTTOM_UP,
+};
+
int SDL_KMSDRM_LoadSymbols(void);

View file

@ -1,5 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
echo 3 >/sys/devices/virtual/graphics/fbcon/rotate

View file

@ -52,11 +52,11 @@ index d37b83f40..b2d8fa2c3 100644
+ if (rotation == 0)
+ *orientation = DRM_MODE_PANEL_ORIENTATION_NORMAL;
+ else if (rotation == 90)
+ *orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP;
+ *orientation = DRM_MODE_PANEL_ORIENTATION_LEFT_UP;
+ else if (rotation == 180)
+ *orientation = DRM_MODE_PANEL_ORIENTATION_BOTTOM_UP;
+ else if (rotation == 270)
+ *orientation = DRM_MODE_PANEL_ORIENTATION_LEFT_UP;
+ *orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP;
+ else
+ return -EINVAL;
+