ecore_drm2: Change display_rotation_set to not return a value

As the actual changing of this property will now be 'atomic', we
cannot return a value here until After we try to apply the change so
remove the return type from the function
This commit is contained in:
Christopher Michael 2023-03-08 10:29:56 -05:00
parent 62f8ea49fa
commit 0aecba7277
2 changed files with 4 additions and 6 deletions

View File

@ -76,7 +76,7 @@ EAPI void ecore_drm2_display_primary_set(Ecore_Drm2_Display *disp, Eina_Bool pri
EAPI const Eina_List *ecore_drm2_displays_get(Ecore_Drm2_Device *dev);
EAPI void ecore_drm2_display_info_get(Ecore_Drm2_Display *disp, int *x, int *y, int *w, int *h, unsigned int *refresh);
EAPI int ecore_drm2_display_rotation_get(Ecore_Drm2_Display *disp);
EAPI Eina_Bool ecore_drm2_display_rotation_set(Ecore_Drm2_Display *disp, uint64_t rotation);
EAPI void ecore_drm2_display_rotation_set(Ecore_Drm2_Display *disp, uint64_t rotation);
/* XXX: These are 'test' APIs */
EAPI void ecore_drm2_display_mode_set(Ecore_Drm2_Display *disp, Ecore_Drm2_Display_Mode *mode, int x, int y);

View File

@ -810,17 +810,15 @@ ecore_drm2_display_rotation_get(Ecore_Drm2_Display *disp)
return disp->state.current->rotation;
}
EAPI Eina_Bool
EAPI void
ecore_drm2_display_rotation_set(Ecore_Drm2_Display *disp, uint64_t rotation)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(disp, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN(disp);
if (disp->state.current->rotation == rotation) return EINA_TRUE;
if (disp->state.current->rotation == rotation) return;
/* TODO, FIXME */
disp->state.pending->rotation = rotation;
disp->state.pending->changes |= ECORE_DRM2_DISPLAY_STATE_ROTATION;
return EINA_FALSE;
}