From 15825d59acbc3052a86fcae0cfc2d5bab389da18 Mon Sep 17 00:00:00 2001 From: fewtarius Date: Thu, 2 Mar 2023 05:43:10 -0500 Subject: [PATCH] bump retroarch --- packages/games/emulators/retroarch/package.mk | 2 +- ...05-disable-drm-resolution-adaptation.patch | 70 ------------------- 2 files changed, 1 insertion(+), 71 deletions(-) delete mode 100644 packages/games/emulators/retroarch/patches/0005-disable-drm-resolution-adaptation.patch diff --git a/packages/games/emulators/retroarch/package.mk b/packages/games/emulators/retroarch/package.mk index 588851ca1..70548ebfd 100644 --- a/packages/games/emulators/retroarch/package.mk +++ b/packages/games/emulators/retroarch/package.mk @@ -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" diff --git a/packages/games/emulators/retroarch/patches/0005-disable-drm-resolution-adaptation.patch b/packages/games/emulators/retroarch/patches/0005-disable-drm-resolution-adaptation.patch deleted file mode 100644 index 2df44e2ed..000000000 --- a/packages/games/emulators/retroarch/patches/0005-disable-drm-resolution-adaptation.patch +++ /dev/null @@ -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 && drmModecount_modes) { -+ g_drm_mode = &g_drm_connector->modes[drmMode]; -+ } -+ } -+ fclose(fdDrmMode); - } - - if (!g_drm_mode)