WVR_UnregisterOverlayInputEvent

WVR_EXPORT WVR_OverlayError WVR_UnregisterOverlayInputEvent(WVR_OverlayInputEvent_t * callback)

Unregister a input event for overlay.

Return
The error code of input event for overlay
Version
API Level 1
Parameters
  • callback: which contained overlayId(callback.overlayId) and event callback(callback.cb), This callback will be called if a input event trigger

How to use

Here is an example for the function:

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

void handleInputEvent(int32_t id, WVR_EventType type, WVR_InputId inputId) {
    if (type == WVR_EventType_ButtonUnpressed) {
        if (inputId == WVR_InputId_Alias1_Digital_Trigger || inputId == WVR_InputId_Alias1_Trigger) {
            ...
        }
    }
}

void exampleFun() {
    WVR_GenOverlay(&mOverlayId);
    WVR_OverlayInputEvent_t overlayEventCallback;
    overlayEventCallback.overlayId = mOverlayId;
    overlayEventCallback.callback = handleInputEvent;
    WVR_RegisterOverlayInputEvent(&overlayEventCallback);
    WVR_UnregisterOverlayInputEvent(&overlayEventCallback);
    WVR_DelOverlay(mOverlayId);
}