[Approved] Refactor of InputDevices to Map actions without triggering them (1 Viewer)

Jason Pyke

Portal Pro
April 12, 2013
96
38
Home Country
Great Britain (UK) Great Britain (UK)
As part of OnlineVideos there is the option of launching an external executable to play a video and this application needs to respond to different remote actions. The patch adds the ability to map a WndProc message or a KeyPress event to the Input handlers and return an Action without actually triggering the Action.

By reworking this it means we can keep the external executable free of dependencies on MediaPortal 1 and can still handle input devices and actions.
 

Attachments

  • MP1_InputChanges.patch
    45.5 KB

Stéphane Lenclud

Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    I don't fully understand what that patch does.
    I'm not quite sure what you do with your Action once you get it?
    Are you somehow sending it to your external program?
    Is it a case of MP getting the input and that external program responding on it?

    I wanted to start working on gamepad support so I was considering building on top of that patch to avoid merge conflict later on.
     

    Jason Pyke

    Portal Pro
    April 12, 2013
    96
    38
    Home Country
    Great Britain (UK) Great Britain (UK)
    You're correct about the patch. Basically, it allows me to pass the wndproc and keypresses from the external application back to MP to be translated to actions. These actions then get passed on to the exe. Without this patch the actions would also be executed within MP, causing undesirable side effects.
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    Sounds rather twisted but why not, if it works :) Thanks for the clarifications.
     

    Users who are viewing this thread

    Top Bottom