コード例 #1
0
ファイル: InputManager.cs プロジェクト: succeun/BizHawk
        public void SyncControls(IEmulator emulator, IMovieSession session, Config config)
        {
            var def = emulator.ControllerDefinition;

            ActiveController   = BindToDefinition(def, config.AllTrollers, config.AllTrollersAnalog);
            AutoFireController = BindToDefinitionAF(emulator, config.AllTrollersAutoFire, config.AutofireOn, config.AutofireOff);

            // allow propagating controls that are in the current controller definition but not in the prebaked one
            // these two lines shouldn't be required anymore under the new system?
            ActiveController.ForceType(new ControllerDefinition(def));
            ClickyVirtualPadController.Definition = new ControllerDefinition(def);

            // Wire up input chain
            ControllerInputCoalescer.Definition = ActiveController.Definition;

            UdLRControllerAdapter.Source    = ActiveController.Or(AutoFireController);
            UdLRControllerAdapter.AllowUdlr = config.AllowUdlr;

            StickyXorAdapter.Source         = UdLRControllerAdapter;
            AutofireStickyXorAdapter.Source = StickyXorAdapter;

            session.MovieIn         = AutofireStickyXorAdapter;
            session.StickySource    = AutofireStickyXorAdapter;
            ControllerOutput.Source = session.MovieOut;
        }
コード例 #2
0
        public void SyncControls(IEmulator emulator, Config config)
        {
            var def = emulator.ControllerDefinition;

            ActiveController   = BindToDefinition(def, config.AllTrollers, config.AllTrollersAnalog);
            AutoFireController = BindToDefinitionAF(def, emulator, config.AllTrollersAutoFire);

            // allow propagating controls that are in the current controller definition but not in the prebaked one
            // these two lines shouldn't be required anymore under the new system?
            ActiveController.ForceType(new ControllerDefinition(def));
            ClickyVirtualPadController.Definition = new ControllerDefinition(def);
            RewireInputChain();
        }