Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f179cb4 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira Committed by Steve Kondik
Browse files

libgui: Add pre-MR2-compatible symbol for setPosition

SurfaceControl::setPosition now takes floats instead of integers as
arguments, which breaks linkability from pre-MR2 blobs. Add a direct
compatibility wrapper, since the values are treated in the same
way.

Change-Id: I293d117b94220258a7dbe354d6c0ee26a0d4314a
parent a40cfcf4
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -104,6 +104,14 @@ status_t SurfaceControl::setPosition(float x, float y) {
    if (err < 0) return err;
    return mClient->setPosition(mHandle, x, y);
}

#ifdef ADD_LEGACY_SET_POSITION_SYMBOL
extern "C" int _ZN7android14SurfaceControl11setPositionEff(float x, float y);
extern "C" int _ZN7android14SurfaceControl11setPositionEii(int32_t x, int32_t y) {
    return _ZN7android14SurfaceControl11setPositionEff((float)x, (float)y);
}
#endif

status_t SurfaceControl::setSize(uint32_t w, uint32_t h) {
    status_t err = validate();
    if (err < 0) return err;