From fa443845ddafcc203e35bfa1c7736bfb1a91600f Mon Sep 17 00:00:00 2001 From: Bernhard Schelling <14200249+schellingb@users.noreply.github.com> Date: Tue, 20 Jun 2023 00:56:48 +0900 Subject: [PATCH] Fix building drm_ctx.x without crt switchres --- gfx/drivers_context/drm_ctx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c index 52c8b9445b..e8cfbbb3b4 100644 --- a/gfx/drivers_context/drm_ctx.c +++ b/gfx/drivers_context/drm_ctx.c @@ -343,6 +343,7 @@ error: /* Get the mode from video_state */ bool gfx_ctx_drm_get_mode_from_video_state(drmModeModeInfoPtr modeInfo) { +#ifdef HAVE_CRTSWITCHRES video_driver_state_t *video_st = video_state_get_ptr(); if (video_st->crt_switch_st.vdisplay < 1) { @@ -375,6 +376,9 @@ bool gfx_ctx_drm_get_mode_from_video_state(drmModeModeInfoPtr modeInfo) /* consider the mode read and removed */ video_st->crt_switch_st.vdisplay = 0; return true; +#else + return false; +#endif } /* Load custom hdmi timings from config */