xbmc: add PR5294

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2014-08-31 14:41:55 +02:00
parent f45cff61c2
commit d6ad660047
3 changed files with 92 additions and 30 deletions

View File

@ -1,12 +0,0 @@
diff -Naur xbmc-30a9070/system/keymaps/keyboard.xml xbmc-30a9070.patch/system/keymaps/keyboard.xml
--- xbmc-30a9070/system/keymaps/keyboard.xml 2011-07-28 06:20:13.000000000 +0200
+++ xbmc-30a9070.patch/system/keymaps/keyboard.xml 2011-07-28 09:39:57.210973380 +0200
@@ -90,7 +90,7 @@
<numpadseven>Number7</numpadseven>
<numpadeight>Number8</numpadeight>
<numpadnine>Number9</numpadnine>
- <backslash>ToggleFullScreen</backslash>
+ <!-- <backslash>ToggleFullScreen</backslash> -->
<home>FirstPage</home>
<end>LastPage</end>
<!-- Multimedia keyboard keys -->

View File

@ -1,18 +0,0 @@
commit 17807066bc04cd28bba89fd176d4d0f69ead9728
Author: Stefan Saraev <stefan@saraev.ca>
Date: Sat Oct 12 16:18:50 2013 +0300
disable minimize
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index b5d40c0..18bea9d 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -5448,7 +5448,6 @@ bool CApplication::SwitchToFullScreen()
void CApplication::Minimize()
{
- g_Windowing.Minimize();
}
PLAYERCOREID CApplication::GetCurrentPlayer()

View File

@ -0,0 +1,92 @@
From 13519e92f7db6a15c0171a229420f528b317507e Mon Sep 17 00:00:00 2001
From: "Chris \"Koying\" Browet" <cbro@semperpax.com>
Date: Sun, 31 Aug 2014 08:59:17 +0200
Subject: [PATCH 1/2] FIX: prevent switching to windowed mode on windowing
system not actually supporting it
---
xbmc/settings/DisplaySettings.cpp | 3 +++
xbmc/windowing/WinSystem.h | 1 +
xbmc/windowing/egl/WinSystemEGL.h | 1 +
xbmc/windowing/osx/WinSystemIOS.h | 1 +
4 files changed, 6 insertions(+)
diff --git a/xbmc/settings/DisplaySettings.cpp b/xbmc/settings/DisplaySettings.cpp
index bb31f15..44d5283 100644
--- a/xbmc/settings/DisplaySettings.cpp
+++ b/xbmc/settings/DisplaySettings.cpp
@@ -330,6 +330,9 @@ bool CDisplaySettings::OnSettingUpdate(CSetting* &setting, const char *oldSettin
void CDisplaySettings::SetCurrentResolution(RESOLUTION resolution, bool save /* = false */)
{
+ if (resolution == RES_WINDOW && !g_Windowing.CanDoWindowed())
+ resolution = RES_DESKTOP;
+
if (save)
{
string mode = GetStringFromResolution(resolution);
diff --git a/xbmc/windowing/WinSystem.h b/xbmc/windowing/WinSystem.h
index c0db210..59aeb2c 100644
--- a/xbmc/windowing/WinSystem.h
+++ b/xbmc/windowing/WinSystem.h
@@ -96,6 +96,7 @@ class CWinSystemBase
unsigned int GetHeight() { return m_nHeight; }
virtual int GetNumScreens() { return 0; }
virtual int GetCurrentScreen() { return 0; }
+ virtual bool CanDoWindowed() { return true; }
bool IsFullScreen() { return m_bFullScreen; }
virtual void UpdateResolutions();
void SetWindowResolution(int width, int height);
diff --git a/xbmc/windowing/egl/WinSystemEGL.h b/xbmc/windowing/egl/WinSystemEGL.h
index d9b3151..6c15471 100644
--- a/xbmc/windowing/egl/WinSystemEGL.h
+++ b/xbmc/windowing/egl/WinSystemEGL.h
@@ -44,6 +44,7 @@ class CWinSystemEGL : public CWinSystemBase, public CRenderSystemGLES
virtual bool SetFullScreen(bool fullScreen, RESOLUTION_INFO& res, bool blankOtherDisplays);
virtual void UpdateResolutions();
virtual bool IsExtSupported(const char* extension);
+ virtual bool CanDoWindowed() { return false; }
virtual void ShowOSMouse(bool show);
virtual bool HasCursor();
diff --git a/xbmc/windowing/osx/WinSystemIOS.h b/xbmc/windowing/osx/WinSystemIOS.h
index 5bab45a..049e0c8 100644
--- a/xbmc/windowing/osx/WinSystemIOS.h
+++ b/xbmc/windowing/osx/WinSystemIOS.h
@@ -44,6 +44,7 @@ class CWinSystemIOS : public CWinSystemBase, public CRenderSystemGLES
virtual bool ResizeWindow(int newWidth, int newHeight, int newLeft, int newTop);
virtual bool SetFullScreen(bool fullScreen, RESOLUTION_INFO& res, bool blankOtherDisplays);
virtual void UpdateResolutions();
+ virtual bool CanDoWindowed() { return false; }
virtual void ShowOSMouse(bool show);
virtual bool HasCursor();
From da41d9b8e52ddfc521a05a588efcf8443989fb83 Mon Sep 17 00:00:00 2001
From: "Chris \"Koying\" Browet" <cbro@semperpax.com>
Date: Sun, 31 Aug 2014 09:00:42 +0200
Subject: [PATCH 2/2] FIX: do not mark resolution as changed if it didn't
---
xbmc/settings/DisplaySettings.cpp | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/xbmc/settings/DisplaySettings.cpp b/xbmc/settings/DisplaySettings.cpp
index 44d5283..e43445b 100644
--- a/xbmc/settings/DisplaySettings.cpp
+++ b/xbmc/settings/DisplaySettings.cpp
@@ -339,9 +339,11 @@ void CDisplaySettings::SetCurrentResolution(RESOLUTION resolution, bool save /*
CSettings::Get().SetString("videoscreen.screenmode", mode.c_str());
}
- m_currentResolution = resolution;
-
- SetChanged();
+ if (resolution != m_currentResolution)
+ {
+ m_currentResolution = resolution;
+ SetChanged();
+ }
}
RESOLUTION CDisplaySettings::GetDisplayResolution() const