예제 #1
0
파일: QuickNES.cs 프로젝트: gocha/BizHawk
        private void SetControllerDefinition()
        {
            ControllerDefinition def = new("NES Controller");

            if (_syncSettings.LeftPortConnected || _syncSettings.RightPortConnected)
            {
                def.BoolButtons.AddRange(PadP1.Select(p => p.Name));
            }
            if (_syncSettings.LeftPortConnected && _syncSettings.RightPortConnected)
            {
                def.BoolButtons.AddRange(PadP2.Select(p => p.Name));
            }
            def.BoolButtons.AddRange(new[] { "Reset", "Power" });             // console buttons
            ControllerDefinition = def.MakeImmutable();
        }
예제 #2
0
        void SetControllerDefinition()
        {
            var def = new ControllerDefinition();

            def.Name = "NES Controller";
            def.BoolButtons.AddRange(new[] { "Reset", "Power" });             // console buttons
            if (_syncSettings.LeftPortConnected || _syncSettings.RightPortConnected)
            {
                def.BoolButtons.AddRange(PadP1.Select(p => p.Name));
            }
            if (_syncSettings.LeftPortConnected && _syncSettings.RightPortConnected)
            {
                def.BoolButtons.AddRange(PadP2.Select(p => p.Name));
            }
            ControllerDefinition = def;
        }