Esempio n. 1
0
        public mupen64plusInputApi(mupen64plusApi core)
        {
            T GetInputDelegate <T>(string proc) where T : Delegate => mupen64plusApi.GetTypedDelegate <T>(InpDll, proc);

            InpDll = core.AttachPlugin(mupen64plusApi.m64p_plugin_type.M64PLUGIN_INPUT,
                                       "mupen64plus-input-bkm.dll");

            InpSetInputCallback       = GetInputDelegate <SetInputCallback>("SetInputCallback");
            InpSetRumbleCallback      = GetInputDelegate <SetRumbleCallback>("SetRumbleCallback");
            InpSetControllerPakType   = GetInputDelegate <SetControllerPakType>("SetControllerPakType");
            InpSetControllerConnected = GetInputDelegate <SetControllerConnected>("SetControllerConnected");
        }
Esempio n. 2
0
        public mupen64plusInputApi(mupen64plusApi core)
        {
            InpDll = core.AttachPlugin(mupen64plusApi.m64p_plugin_type.M64PLUGIN_INPUT,
                                       "mupen64plus-input-bkm.dll");

            mupen64plusApi.m64p_error result;
            InpSetInputCallback       = (SetInputCallback)Marshal.GetDelegateForFunctionPointer(GetProcAddress(InpDll, "SetInputCallback"), typeof(SetInputCallback));
            InpSetRumbleCallback      = (SetRumbleCallback)Marshal.GetDelegateForFunctionPointer(GetProcAddress(InpDll, "SetRumbleCallback"), typeof(SetRumbleCallback));
            InpSetControllerPakType   = (SetControllerPakType)Marshal.GetDelegateForFunctionPointer(GetProcAddress(InpDll, "SetControllerPakType"), typeof(SetControllerPakType));
            InpSetControllerConnected = (SetControllerConnected)Marshal.GetDelegateForFunctionPointer(GetProcAddress(InpDll, "SetControllerConnected"), typeof(SetControllerConnected));

            m64pRumbleCallback = new RumbleCallback(FireOnRumbleChange);
            result             = InpSetRumbleCallback(m64pRumbleCallback);
        }
Esempio n. 3
0
		public mupen64plusInputApi(mupen64plusApi core)
		{
			InpDll = core.AttachPlugin(mupen64plusApi.m64p_plugin_type.M64PLUGIN_INPUT,
				"mupen64plus-input-bkm.dll");

			mupen64plusApi.m64p_error result;
			InpSetInputCallback = (SetInputCallback)Marshal.GetDelegateForFunctionPointer(GetProcAddress(InpDll, "SetInputCallback"), typeof(SetInputCallback));
			InpSetRumbleCallback = (SetRumbleCallback)Marshal.GetDelegateForFunctionPointer(GetProcAddress(InpDll, "SetRumbleCallback"), typeof(SetRumbleCallback));
			InpSetControllerPakType = (SetControllerPakType)Marshal.GetDelegateForFunctionPointer(GetProcAddress(InpDll, "SetControllerPakType"), typeof(SetControllerPakType));
			InpSetControllerConnected = (SetControllerConnected)Marshal.GetDelegateForFunctionPointer(GetProcAddress(InpDll, "SetControllerConnected"), typeof(SetControllerConnected));

			m64pRumbleCallback = new RumbleCallback(FireOnRumbleChange);
			result = InpSetRumbleCallback(m64pRumbleCallback);
		}