diff options
author | Lars Op den Kamp <lars@opdenkamp.eu> | 2011-08-29 15:04:49 +0200 |
---|---|---|
committer | Lars Op den Kamp <lars@opdenkamp.eu> | 2011-09-30 00:37:53 +0200 |
commit | 034236bf690119b2a82be1133ff328bccbdc4411 (patch) | |
tree | 73591daaadc6539cee5c71bab0325485096e79ec /.gitignore | |
parent | 714ad40da8b2ead338aa8e57ef6a5b6802d8a2df (diff) |
Squashed original peripherals PR #383
This is a PR for a new "peripherals manager", /xbmc/peripherals, that detects devices and automatically configures them for use with XBMC. The device mappings and configurations can be defined in system/peripherals.xml. Users can modify settings via system->system->input->peripherals.
It works as follows:
- CPeripherals contains one or more CPeripheralBus instances.
- CPeripheralBus contains the device scanning implementations for the different platforms we support.
- The implementations for the devices can be found in peripheral/devices and all devices inherit from CPeripheral.
- The devices that are detected are looked up in peripherals.xml, starting at the top of the file and going down. If no mapping was found for the device, an instance of one of the default classes will be created: CPeripheralHID, CPeripheralDisk or CPeripheralNIC.
- in peripherals.xml, devices can be matched by vendor id (vendor="xxxx"), product id (product="xxxx"), bus type (bus="xxxx"), device class (class="xxxx") or a combination of these values. The class that will be instantiated for that device is defined in mapTo="xxxx"
- the configuration for the device can be defined in peripherals.xml as well. Have a look at system/peripherals.xml, where you can find the possible settings in the demo entry at the bottom. When a device is inserted and there are any settings with configurable="true" present for that device, these settings will be added to the settings dialog, under system->system->input->peripherals.
- an example of how these settings can be used can be found in CPeripheralHID, which checks for a "keymap" setting and will automatically switch the keymap XBMC uses to the one that is defined in the setting.
TODO:
- keep separate configs when the same device is found more than once
- general review of this code.
Diffstat (limited to '.gitignore')
-rw-r--r-- | .gitignore | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore index 04c277989a..2969b015f6 100644 --- a/.gitignore +++ b/.gitignore @@ -125,6 +125,9 @@ config.log /xbmc/guilib/Profile /xbmc/guilib/Profile_FastCap +# /xbmc/peripherals/ +/xbmc/peripherals/bus/Makefile + # /lib/ /lib/Makefile |