bump retroarch

This commit is contained in:
fewtarius 2023-03-02 05:43:10 -05:00
parent 07a695829e
commit 15825d59ac
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A
2 changed files with 1 additions and 71 deletions

View file

@ -2,7 +2,7 @@
# Copyright (C) 2021-present 351ELEC (https://github.com/351ELEC)
PKG_NAME="retroarch"
PKG_VERSION="7a2c6e9e521f60a79a88974f90a9840a46f8c6bc"
PKG_VERSION="152867d14fadb9b100d68892c4fcf5b51e180123"
PKG_SITE="https://github.com/libretro/RetroArch"
PKG_URL="${PKG_SITE}.git"
PKG_LICENSE="GPLv3"

View file

@ -1,70 +0,0 @@
diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c
index 182d0b4..66d063c 100644
--- a/gfx/drivers_context/drm_ctx.c
+++ b/gfx/drivers_context/drm_ctx.c
@@ -701,6 +701,8 @@ static bool gfx_ctx_drm_set_video_mode(void *data,
settings_t *settings = config_get_ptr();
unsigned black_frame_insertion = settings->uints.video_black_frame_insertion;
float video_refresh_rate = settings->floats.video_refresh_rate;
+ FILE* fdDrmMode;
+ int drmMode;
if (!drm)
return false;
@@ -715,46 +717,16 @@ static bool gfx_ctx_drm_set_video_mode(void *data,
/* Find desired video mode, and use that.
* If not fullscreen, we get desired windowed size,
* which is not appropriate. */
- if ((width == 0 && height == 0) || !fullscreen)
- g_drm_mode = &g_drm_connector->modes[0];
- else
- {
- /* check if custom hdmi timings were asked */
- if(gfx_ctx_crt_switch_mode.vdisplay > 0)
- {
- RARCH_LOG("[DRM]: custom mode requested: %s\n", gfx_ctx_crt_switch_mode.name);
- g_drm_mode = &gfx_ctx_crt_switch_mode;
- }
- else
- {
- /* Try to match refresh_rate as closely as possible.
- *
- * Lower resolutions tend to have multiple supported
- * refresh rates as well.
- */
- float minimum_fps_diff = 0.0f;
- float mode_vrefresh = 0.0f;
- drmModeModeInfo *mode;
-
- /* Find best match. */
- for (i = 0; i < g_drm_connector->count_modes; i++) {
- float diff;
- mode = &g_drm_connector->modes[i];
-
- if (width != mode->hdisplay ||
- height != mode->vdisplay)
- continue;
-
- mode_vrefresh = drm_calc_refresh_rate(mode);
-
- diff = fabsf(refresh_mod * mode_vrefresh - video_refresh_rate);
-
- if (!g_drm_mode || diff < minimum_fps_diff) {
- g_drm_mode = mode;
- minimum_fps_diff = diff;
- }
- }
- }
+ //if ((width == 0 && height == 0) || !fullscreen)
+ g_drm_mode = &g_drm_connector->modes[0];
+ // batocera - set resolution
+ if((fdDrmMode = fopen("/var/run/drmMode", "r")) != NULL) {
+ if(fscanf(fdDrmMode, "%i", &drmMode) == 1) {
+ if(drmMode>=0 && drmMode<g_drm_connector->count_modes) {
+ g_drm_mode = &g_drm_connector->modes[drmMode];
+ }
+ }
+ fclose(fdDrmMode);
}
if (!g_drm_mode)