[solved] MP1-4585 Generic HID input device support for MCE buttons (2 Viewers)

Stéphane Lenclud

Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    Just published a new version by updating that link in the first post.
    That one was rebased on master which is actually 1.10 final.
    It also includes various fixes to get the background behavior working again.

    Background handling of HID events can be configure at two levels through that Generic-HID.xml.
    Each HidUsageAction section can be be setup to HandleHidEventsWhileInBackground or not.
    Now each button from HidUsageAction with HandleHidEventsWhileInBackground enabled can be marked as being a valid background button.
    By default ConsumerControl registers for background event. Then only a few buttons which actually make sense to control your music while in background have been marked as valid background buttons.

    Anyway that whole background handling is now a lot more configurable than before and should work even better, not handling of browser back button while in background for instance, at least not if you don't want to :)
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    Updated the installer again. This last one only includes cosmetic changes to remote settings dialog.
    I also edited the first post and removed the following text from it:

    Stéphane Lenclud said:
    There is some minor issues with volume control as mentioned there.
    Also the Mapping dialog in the configuration is not functional.
    I'm wondering if I should even bother implementing one.
    What's your opinion on that. Mapping dialog or no mapping dialog?
    I never bothered using it myself.

    The issue mentioned in there have already been tackled.
     
    Last edited:

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    Using this with iMON hardware in 'MCE remote' mode multimedia commands are not working.
    Most likely because iMON manager simply generates WM_APPCOMMAND messages for those.
    I'm guessing a few other software/hardware combination could have similar issue.
    I'm going to re-introduce the WM_APPCOMMAND support in another tab/remote plugin.
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    So there it is we now have an HID tab and a Media tab.
    HID is that generic HID implementation.
    Media tab is basically the former 'General HID' which just handles application commands.
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    [USERGROUP=39][USERGROUP=39]@Developers[/USERGROUP][/USERGROUP] [USERGROUP=40][USERGROUP=40]@Testers[/USERGROUP][/USERGROUP]
    Let's wrap it up guys!
    I merged all the changes in a single one and created a code review:
    https://issues.team-mediaportal.com/fisheye/cru/MP1CR-612
    Here are the diffs on GitHub:
    https://github.com/MediaPortal/MediaPortal-1/commit/a2a93ae79b75ba79c166df31fbbe0afad743479f

    Updated the installer link one more time.
    I'm ready to merge this to master whenever you are happy with it too.
     
    Last edited:

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    @mm1352000 Thanks for your code review mate.
    I'm trying to use Resharper to help me sort out those coding guideline issues.
    Is there no way to have indentation settings per projects? Resharper cleaner does not apply 2 spaces.

    Besides why don't we use 4 spaces like the rest of the world? I find 2 spaces indent much harder to read.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Is there no way to have indentation settings per projects?
    I don't know. As far as I can see, the answer is no... but there are hacks and extensions like this:
    https://visualstudiogallery.msdn.microsoft.com/c8bccfe2-650c-4b42-bc5c-845e21f96328

    Besides why don't we use 4 spaces like the rest of the world? I find 2 spaces indent much harder to read.
    If you want to change the style then start a thread and lets talk about it. In the meantime, the most important thing is to be consistent with existing code. Code which has different styles used all over the place has very poor readability.

    On that note, I'm sorry to say that your settings are still not correct. For example (RawInput.cs):
    Code:
    var deviceName = Marshal.AllocHGlobal((int) deviceNameSize*2); // size is the character count not byte count

    This should be:
    Code:
    var deviceName = Marshal.AllocHGlobal((int)deviceNameSize * 2); // size is the character count not byte count
     

    Users who are viewing this thread

    Top Bottom