From b587629909755b4da2134a3e33ff6a467cd94e17 Mon Sep 17 00:00:00 2001 From: fewtarius Date: Sat, 6 Aug 2022 18:43:56 -0400 Subject: [PATCH] Reverse reverse brain mode. --- packages/games/tools/libgo2/patches/RG353P | 1 + .../patches/RG503/0001-remove_rotation.patch | 32 +++++++++++++++++++ ...0002-grab-first-mode-if-no-preferred.patch | 29 +++++++++++++++++ 3 files changed, 62 insertions(+) create mode 120000 packages/games/tools/libgo2/patches/RG353P create mode 100644 packages/games/tools/libgo2/patches/RG503/0001-remove_rotation.patch create mode 100644 packages/games/tools/libgo2/patches/RG503/0002-grab-first-mode-if-no-preferred.patch diff --git a/packages/games/tools/libgo2/patches/RG353P b/packages/games/tools/libgo2/patches/RG353P new file mode 120000 index 000000000..46098be24 --- /dev/null +++ b/packages/games/tools/libgo2/patches/RG353P @@ -0,0 +1 @@ +RG503 \ No newline at end of file diff --git a/packages/games/tools/libgo2/patches/RG503/0001-remove_rotation.patch b/packages/games/tools/libgo2/patches/RG503/0001-remove_rotation.patch new file mode 100644 index 000000000..8ca88bf92 --- /dev/null +++ b/packages/games/tools/libgo2/patches/RG503/0001-remove_rotation.patch @@ -0,0 +1,32 @@ +From 0475adef34dd591096e6a8619c8f2bf0d2ba4392 Mon Sep 17 00:00:00 2001 +From: christianhaitian +Date: Fri, 9 Apr 2021 01:44:58 -0400 +Subject: [PATCH] Remove rotation + +--- + src/display.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/src/display.c b/src/display.c +index 52b2827..4f3dc3b 100644 +--- a/src/display.c ++++ b/src/display.c +@@ -601,15 +601,15 @@ void go2_surface_blit(go2_surface_t* srcSurface, int srcX, int srcY, int srcWidt + break; + + case GO2_ROTATION_DEGREES_90: +- src.rotation = HAL_TRANSFORM_ROT_90; ++ src.rotation = 0; + break; + + case GO2_ROTATION_DEGREES_180: +- src.rotation = HAL_TRANSFORM_ROT_180; ++ src.rotation = 0; + break; + + case GO2_ROTATION_DEGREES_270: +- src.rotation = HAL_TRANSFORM_ROT_270; ++ src.rotation = 0; + break; + + default: diff --git a/packages/games/tools/libgo2/patches/RG503/0002-grab-first-mode-if-no-preferred.patch b/packages/games/tools/libgo2/patches/RG503/0002-grab-first-mode-if-no-preferred.patch new file mode 100644 index 000000000..b8d063d99 --- /dev/null +++ b/packages/games/tools/libgo2/patches/RG503/0002-grab-first-mode-if-no-preferred.patch @@ -0,0 +1,29 @@ +diff -rupN libgo2.orig/src/display.c libgo2/src/display.c +--- libgo2.orig/src/display.c 2022-06-22 19:00:03.307175769 -0400 ++++ libgo2/src/display.c 2022-06-22 20:16:23.211175862 -0400 +@@ -150,8 +150,9 @@ go2_display_t* go2_display_create() + result->connector_id = connector->connector_id; + + +- // Find prefered mode ++ // Find display mode + drmModeModeInfo* mode; ++ mode = &connector->modes[0]; + for (i = 0; i < connector->count_modes; i++) + { + drmModeModeInfo *current_mode = &connector->modes[i]; +@@ -160,14 +161,6 @@ go2_display_t* go2_display_create() + mode = current_mode; + break; + } +- +- mode = NULL; +- } +- +- if (!mode) +- { +- printf("DRM_MODE_TYPE_PREFERRED not found.\n"); +- goto err_03; + } + + result->mode = *mode;