WVR_IsOverlayValid

WVR_EXPORT bool WVR_IsOverlayValid(int32_t overlayId)

Overlay system will release after android suspended, so check WVR_IsOverlayValid per frame in native APP. If WVR_IsOverlayValid return false, re-call WVR_GenOverlay to re-generate new overlay id.

Return
This overlay id is valid or not
Version
API Level 2
Parameters
  • overlayId: which overlay should be control.

How to use

Here is an example for the function:

#include <wvr/wvr_overlay.h>
int32_t mOverlayId;

void exampleFun() {
    WVR_GenOverlay(&mOverlayId);
    WVR_IsOverlayValid(mOverlayId);
    WVR_DelOverlay(mOverlayId);
}