Would like to add a Slider control patch. Is there a How To?

Hello

I patched the File “xbmc/guilib/GUISliderControl.cpp” to control horizontal sliders by up/down also, if itself is active.
For vertical slider it is also possible, with an other patch. or one patch for both.

Do you like this Patch?
I think it is more helpfull for rotary controls.

But i don’t know how to add a working patch-file.
Is there a How To? Or does the code below reach out?

--- GUISliderControl.cpp.ORG	2017-02-15 16:43:02.000000000 +0100
+++ GUISliderControl.cpp	2017-02-15 17:57:37.000000000 +0100
@@ -212,7 +212,7 @@
     break;
 
   case ACTION_MOVE_UP:
-    if (IsActive() && m_orientation == VERTICAL)
+    if (IsActive())
     {
       Move(1);
       return true;
@@ -220,7 +220,7 @@
     break;
 
   case ACTION_MOVE_DOWN:
-    if (IsActive() && m_orientation == VERTICAL)
+    if (IsActive())
     {
       Move(-1);
       return true;

Cool.

Best to go to here: Kodi Community Forum - Kodi Application

on kodi.tv i asked already for this feature. but they were not interested.
Kodi 17 Slider move right/left by up/down, after enabeling

so i decided to solve the problem by myself.
would be cool, when osmc like it.

We aren’t directing you there to ask them to do it for you. We’re directing you there because what you are trying to do is quite specific to Kodi code and function. OSMC has no bearing on that.

That subforum would be where you might ask how one would integrate the change to kodi function you’ve customized for yourself there.

that means, you don’t like it?

on osmc it is possible to place patches in this dir “package/mediacenter-osmc/patches/”

ok, i give it a try:

This is not what we were suggesting… The PR will not be accepted… If you want this patch, you will have to compile Kodi yourself.

oh ok. but why do you share all these patches, if you don’t accept them?

Personally, I’m really not even sure exactly what you are trying to change here. You seem to be the only one wishing to change some kind of sliders. You haven’t made it clear exactly what you are attempting here. We’re not even sure if your patch might break something else so, we aren’t keen to push this change to the thousands of users who use OSMC. Providing pictures of exactly what you are talking about changing here would likely allow folks to understand better.

Hi

Thanks for the proposed patch. We are always trying to improve OSMC and we’re happy to accept patches that may not always make it in to Kodi. However it’s currently unclear what this patch aims to achieve. If you can provide some background on what you’re trying to do then we can review it better.

Further – in the Kodi forums I noticed that you said the patch does not work. We would only accept the patch if it achieved the intended goals and worked correctly.

Sam

OK, i try to describe for better understanding.
this patch is for horizontal slider controls.
i’m using a rotary encoder for controlling the screen navigation.
since kodi 17 you have to enbale to move the slider itself.
by moving up/down you leave the slider.
so i thought, would be cool, to move the slider left/right by down/up. and deactivate it for leaving.

1. activate the horizontal slider with press
2.a) moves left with left
2.b) moves left with down
2.c) moves right with up
2.d) moves right with right
3. deactivate with press

my current patch is only for horizontal sliders. the same on directions left/right is for vertical slider possible.

the error in the thread on kodi.tv was about the kodi compiling on windows. you compiling procedure on rasp works well.
at this time a got a working patch file and the compiling process is running.

in some minutes i can give feedback about the patch.
i’ll make a video with the new effect.

There is the Video:

Okay

Why can’t you adjust before deploying to touch screen or use another method of control, albeit temporarily to do so?

Sam

this is an oem bmw bordscreen without mods. no touch.
the rasp videosignal comes over the tv modul. the rotary encoder and all other button events do i read from data bus with an IBus interface.