distribution/packages/games/tools/libgo2/patches/RG503/0002-grab-first-mode-if-no-preferred.patch
2022-08-06 18:43:56 -04:00

29 lines
827 B
Diff

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;