free drm prop before returning
parent
970344719a
commit
dd68eb5c01
|
@ -629,8 +629,9 @@ KMSDRM_CrtcSetVrr(uint32_t drm_fd, uint32_t crtc_id, SDL_bool enabled)
|
||||||
static SDL_bool
|
static SDL_bool
|
||||||
KMSDRM_CrtcGetVrr(uint32_t drm_fd, uint32_t crtc_id)
|
KMSDRM_CrtcGetVrr(uint32_t drm_fd, uint32_t crtc_id)
|
||||||
{
|
{
|
||||||
uint32_t vrr_prop_id;
|
uint32_t object_prop_id, vrr_prop_id;
|
||||||
drmModeObjectPropertiesPtr props;
|
drmModeObjectPropertiesPtr props;
|
||||||
|
SDL_bool object_prop_value;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!KMSDRM_VrrPropId(drm_fd, crtc_id, &vrr_prop_id))
|
if (!KMSDRM_VrrPropId(drm_fd, crtc_id, &vrr_prop_id))
|
||||||
|
@ -650,11 +651,14 @@ KMSDRM_CrtcGetVrr(uint32_t drm_fd, uint32_t crtc_id)
|
||||||
if (!drm_prop)
|
if (!drm_prop)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(drm_prop->prop_id == vrr_prop_id) {
|
object_prop_id = drm_prop->prop_id;
|
||||||
return props->prop_values[i] ? SDL_TRUE: SDL_FALSE;
|
object_prop_value = props->prop_values[i] ? SDL_TRUE: SDL_FALSE;
|
||||||
}
|
|
||||||
|
|
||||||
KMSDRM_drmModeFreeProperty(drm_prop);
|
KMSDRM_drmModeFreeProperty(drm_prop);
|
||||||
|
|
||||||
|
if(object_prop_id == vrr_prop_id) {
|
||||||
|
return object_prop_value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue