示例#1
0
        public int DeregisterHardwareEvent(int hardwareType, GameDeviceHWEventListener el)
        {
            if (mDeviceInterface == null)
            {
                throw new Exception("Fatal exception that device interface is null");
            }

            return(mDeviceInterface.DeregisterEvent(hardwareType, el));
        }
示例#2
0
        public int RegisterHardwareEvent(int hardwareType, GameDeviceHWEventListener el)
        {
            if (mDeviceInterface == null)
            {
                throw new Exception("Fatal exception that device interface is null");
            }

            switch (hardwareType)
            {
            case HW_EVENT_VIBRATOR:
            case HW_EVENT_PROXIMITY:
            case HW_EVENT_SOUND:
                return(mDeviceInterface.RegisterEvent(hardwareType, el));

            default:
                Log(LOG_WARNING, TAG, "Unsupported hw event type");
                break;
            }

            return(-1);
        }