Permalink
Browse files

[droid] support being Home'd

This has an ugly fix using CApplication::ReloadSkin() to make sure all textures/fonts are reloaded

Note: This work was originally done by Montellese, but reworked by TheUni to
work with the shared-lib merge. It worked fine as Montellese wrote it, but now
who knows.

It also relies on the shared-lib merge.
  • Loading branch information...
1 parent b9d9642 commit fc9d38e5ef211f7099001617494668a99ebea5ab @Montellese Montellese committed with Cory Fields May 10, 2012
Showing with 41 additions and 0 deletions.
  1. +35 −0 xbmc/ApplicationMessenger.cpp
  2. +6 −0 xbmc/ApplicationMessenger.h
@@ -770,6 +770,19 @@ case TMSG_POWERDOWN:
g_application.GetSplash()->Show(pMsg->strParam);
}
break;
+
+ case TMSG_DISPLAY_SETUP:
+ {
+ *((bool*)pMsg->lpVoid) = g_application.InitWindow();
+ g_application.ReloadSkin();
+ }
+ break;
+
+ case TMSG_DISPLAY_DESTROY:
+ {
+ *((bool*)pMsg->lpVoid) = g_application.DestroyWindow();
+ }
+ break;
}
}
@@ -1209,3 +1222,25 @@ void CApplicationMessenger::SetSplashMessage(int stringID)
{
SetSplashMessage(g_localizeStrings.Get(stringID));
}
+
+bool CApplicationMessenger::SetupDisplay()
+{
+ bool result;
+
+ ThreadMessage tMsg = {TMSG_DISPLAY_SETUP};
+ tMsg.lpVoid = (void*)&result;
+ SendMessage(tMsg, true);
+
+ return result;
+}
+
+bool CApplicationMessenger::DestroyDisplay()
+{
+ bool result;
+
+ ThreadMessage tMsg = {TMSG_DISPLAY_DESTROY};
+ tMsg.lpVoid = (void*)&result;
+ SendMessage(tMsg, true);
+
+ return result;
+}
@@ -100,6 +100,9 @@ class CGUIMessage;
#define TMSG_VOLUME_SHOW 900
#define TMSG_SPLASH_MESSAGE 901
+#define TMSG_DISPLAY_SETUP 1000
+#define TMSG_DISPLAY_DESTROY 1001
+
typedef struct
{
DWORD dwMessage;
@@ -214,6 +217,9 @@ class CApplicationMessenger
void SetSplashMessage(const CStdString& message);
void SetSplashMessage(int stringID);
+
+ bool SetupDisplay();
+ bool DestroyDisplay();
private:
// private construction, and no assignements; use the provided singleton methods

0 comments on commit fc9d38e

Please sign in to comment.