MrMC / mrmc

MrMC Main Repository - By using this code you agree to follow the GPLv2 license.
http://forum.mrmc.tv
Other
186 stars 68 forks source link

Enable "Use menu to stop video playback" for all devices #21

Open MrMC opened 7 years ago

MrMC commented 7 years ago

Currently only tvOS has this, would be nice for all devices.

diff --git a/system/settings/settings.xml b/system/settings/settings.xml index aa76f4c..88a8d53 100644 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml @@ -3344,6 +3344,11 @@

     </setting>
  • 1
  • false

diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index 0923dfc..e58c2db 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -1996,7 +1996,13 @@ bool CApplication::OnAction(const CAction &action) { // special case for switching between GUI & fullscreen mode. if (action.GetID() == ACTION_SHOW_GUI)

  • { // Switch to fullscreen mode if we can
  • {
  • if (g_windowManager.GetFocusedWindow() == WINDOW_FULLSCREEN_VIDEO)
  • {
  • if (CSettings::GetInstance().GetBool(CSettings::SETTING_INPUT_BACKSTOPSPLAYING))
  • CApplicationMessenger::GetInstance().PostMsg(TMSG_MEDIA_STOP);
  • }
  • // Switch to fullscreen mode if we can if (SwitchToFullScreen()) { m_navigationTimer.StartZero();

Or something like that :)

koying commented 7 years ago

Is it worth a setting? Seems like perverting the keymap system. I just changed the mapping in the fullscreen window https://github.com/koying/SPMC/blob/spmc-jarvis/system/keymaps/keyboard.xml#L302

Users can still revert with a custom keymap.

MrMC commented 7 years ago

heh, that's why I added the final, 'something like that'. On tvOS, we are not running a keymap so we handled it in menuPressed:(UITapGestureRecognizer *)sender in MainController.mm.

I still think it makes sense to have a user exposed setting. Most users have no clue how to deal with a custom keymap to change the behavior and on some platforms, doing this is a pain in the rear.

Your suggestion to change at the keymap mapping level is a thought. Will also look into adding keymapping to tvOS. I think Memphiz has that in his tvOS branch.

koying commented 7 years ago

On tvOS, we are not running a keymap

Ah, that's something else ;)

Most users have no clue how to deal with a custom keymap to change the behavior

That's a fact. Indeed, creating a setting is the pragmatic way... Or do something like http://kodi.wiki/view/Add-on:Keymap_Editor in core, but it's mucho work for little return...