aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain CECCHETTO <cecchetto.sylvain@me.com>2022-10-13 19:29:03 +0200
committerSylvain CECCHETTO <cecchetto.sylvain@me.com>2022-10-15 15:07:51 +0200
commite9c0feab2afeba4b3e8a3a29bbe3a457838d000a (patch)
tree140ccc7856f3f3536d29c488f09fde7d81b8a9aa
parent5fe64c984a00160727a12c41cf4415243e545275 (diff)
[tvOS] Add help message for Siri remote pan sensitivy + inverse setting order
-rw-r--r--addons/resource.language.en_gb/resources/strings.po5
-rw-r--r--system/settings/darwin_tvos.xml12
-rw-r--r--xbmc/platform/darwin/tvos/input/LibInputTouch.mm9
3 files changed, 15 insertions, 11 deletions
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
index fbd86559cd..79672ddb83 100644
--- a/addons/resource.language.en_gb/resources/strings.po
+++ b/addons/resource.language.en_gb/resources/strings.po
@@ -16138,7 +16138,10 @@ msgctxt "#24162"
msgid "Use Kodi virtual keyboard"
msgstr ""
-#empty string with id 24163
+#: system/settings/darwin_tvos.xml
+msgctxt "#24163"
+msgid "The higher the value, the more sensitive the pan gesture"
+msgstr ""
#. Header text for yes/no dialog about enable of broken add-on
#: xbmc/addons/gui/GUIHelpers.cpp
diff --git a/system/settings/darwin_tvos.xml b/system/settings/darwin_tvos.xml
index 68a13c7976..05bc49f1fb 100644
--- a/system/settings/darwin_tvos.xml
+++ b/system/settings/darwin_tvos.xml
@@ -69,23 +69,23 @@
</dependencies>
</setting>
<!-- Siri remote sensitivity -->
- <setting id="input.siriremotehorizontalsensitivity" type="integer" label="34009">
+ <setting id="input.siriremotehorizontalsensitivity" type="integer" label="34009" help="24163">
<level>2</level>
- <default>1000</default>
+ <default>500</default>
<constraints>
<minimum>50</minimum>
<step>50</step>
- <maximum>1500</maximum>
+ <maximum>1450</maximum>
</constraints>
<control type="spinner" format="integer" delayed="false"/>
</setting>
- <setting id="input.siriremoteverticalsensitivity" type="integer" label="34010">
+ <setting id="input.siriremoteverticalsensitivity" type="integer" label="34010" help="24163">
<level>2</level>
- <default>550</default>
+ <default>650</default>
<constraints>
<minimum>50</minimum>
<step>50</step>
- <maximum>1500</maximum>
+ <maximum>1450</maximum>
</constraints>
<control type="spinner" format="integer" delayed="false"/>
</setting>
diff --git a/xbmc/platform/darwin/tvos/input/LibInputTouch.mm b/xbmc/platform/darwin/tvos/input/LibInputTouch.mm
index 77f67bace3..61319cbc5c 100644
--- a/xbmc/platform/darwin/tvos/input/LibInputTouch.mm
+++ b/xbmc/platform/darwin/tvos/input/LibInputTouch.mm
@@ -442,6 +442,7 @@
auto translation = [sender translationInView:sender.view];
auto velocity = [sender velocityInView:sender.view];
auto direction = [self getPanDirection:velocity];
+ const auto maxSensitivity = 1500;
switch (sender.state)
{
@@ -458,7 +459,7 @@
case UIPanGestureRecognizerDirectionUp:
{
if (fabs(m_lastGesturePoint.y - translation.y) >
- g_xbmcController.inputHandler.inputSettings.siriRemoteVerticalSensitivity)
+ maxSensitivity - g_xbmcController.inputHandler.inputSettings.siriRemoteVerticalSensitivity)
{
CLog::Log(LOGDEBUG, "Input: Siri remote pan up (id: 23)");
keyId = 23;
@@ -468,7 +469,7 @@
case UIPanGestureRecognizerDirectionDown:
{
if (fabs(m_lastGesturePoint.y - translation.y) >
- g_xbmcController.inputHandler.inputSettings.siriRemoteVerticalSensitivity)
+ maxSensitivity - g_xbmcController.inputHandler.inputSettings.siriRemoteVerticalSensitivity)
{
CLog::Log(LOGDEBUG, "Input: Siri remote pan down (id: 24)");
keyId = 24;
@@ -478,7 +479,7 @@
case UIPanGestureRecognizerDirectionLeft:
{
if (fabs(m_lastGesturePoint.x - translation.x) >
- g_xbmcController.inputHandler.inputSettings.siriRemoteHorizontalSensitivity)
+ maxSensitivity - g_xbmcController.inputHandler.inputSettings.siriRemoteHorizontalSensitivity)
{
CLog::Log(LOGDEBUG, "Input: Siri remote pan left (id: 25)");
keyId = 25;
@@ -488,7 +489,7 @@
case UIPanGestureRecognizerDirectionRight:
{
if (fabs(m_lastGesturePoint.x - translation.x) >
- g_xbmcController.inputHandler.inputSettings.siriRemoteHorizontalSensitivity)
+ maxSensitivity - g_xbmcController.inputHandler.inputSettings.siriRemoteHorizontalSensitivity)
{
CLog::Log(LOGDEBUG, "Input: Siri remote pan right (id: 26)");
keyId = 26;