public RetroArchBsnesGameEmulation(IGame game,
                                    IConfigurationCollection <HiganRetroArchConfiguration> configurationProfile,
                                    IEnumerable <IEmulatedController> controllerPorts,
                                    ISaveProfile saveProfile,
                                    IDictionary <InputDriver, IDeviceInputMapping> inputMappings,
                                    IEmulatorExecutable retroarchExecutable) : base(game, configurationProfile, controllerPorts, saveProfile)
 {
     this.InputMappings = inputMappings;
     this.Executable    = retroarchExecutable;
     this.Scratch       = this.Game.WithFiles().GetRuntimeLocation();
 }
Exemplo n.º 2
0
        public HiganTaskRunner(IEmulatorExecutable retroArchExecutable,
                               IPluginProvision pluginProvision,
                               IEmulatorProperties properties)
        {
            this.RetroArchExecutable = retroArchExecutable;
            if (this.RetroArchExecutable == null)
            {
                throw new FileNotFoundException("RetroArch emulator executable was not installed!");
            }

            this.Properties    = properties;
            this.CoreDirectory = pluginProvision.CommonResourceDirectory.CreateSubdirectory("cores");
        }
        public RetroArchBsnesOrchestrator(IEmulatorExecutable retroArchExecutable, IPluginProvision provision)
            : base(provision)
        {
            this.RetroArchExecutable = retroArchExecutable;
            var mapping = JsonConvert.DeserializeObject <DictionaryInputMapping>
                              (this.Provision.CommonResourceDirectory.OpenFile("inputmappings.json").ReadAllText());

            this.Mappings = new Dictionary <InputDriver, IDeviceInputMapping>()
            {
                { InputDriver.Keyboard, mapping },
                { InputDriver.DirectInput, mapping },
                { InputDriver.XInput, mapping },
            };
        }