Пример #1
0
        internal N64Input(IInputPollable emuCore, mupen64plusApi core, N64SyncSettings.N64ControllerSettings[] controllerSettings)
        {
            _emuCore = emuCore;
            _api     = new mupen64plusInputApi(core);

            _api.SetM64PInputCallback(GetControllerInput);

            core.VInterrupt += ShiftInputPolledBools;
            for (int i = 0; i < controllerSettings.Length; ++i)
            {
                SetControllerConnected(i, controllerSettings[i].IsConnected);
                SetControllerPakType(i, controllerSettings[i].PakType);
            }
        }
Пример #2
0
        public N64Input(mupen64plusApi core, CoreComm comm, N64SyncSettings.N64ControllerSettings[] controllerSettings)
        {
            api      = new mupen64plusInputApi(core);
            CoreComm = comm;

            api.SetM64PInputCallback(new mupen64plusInputApi.InputCallback(GetControllerInput));

            core.VInterrupt += ShiftInputPolledBools;
            for (int i = 0; i < controllerSettings.Length; ++i)
            {
                SetControllerConnected(i, controllerSettings[i].IsConnected);
                SetControllerPakType(i, controllerSettings[i].PakType);
            }
        }