Skip to content

Commit

Permalink
[CApplicationMessenger] Move RegisterReceiver(...) from CApplication:…
Browse files Browse the repository at this point in the history
…:Initialize(...) to CApplication::Create(...), which connects CApplicationMessenger receivers earlier
  • Loading branch information
AchimTuran committed Jul 19, 2015
1 parent 3a47349 commit 161e359
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions xbmc/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,13 @@ bool CApplication::Create()
SetupNetwork();
Preflight();

// here we register all global classes for the CApplicationMessenger,
// after that we can send messages to the correspnding modules
CApplicationMessenger::Get().RegisterReceveiver(this);

This comment has been minimized.

Copy link
@un1versal

un1versal Jul 22, 2015

Contributor

RegisterReceveiver -> really?

RegisterReceiver

This comment has been minimized.

Copy link
@AchimTuran

AchimTuran Jul 22, 2015

Author Member

You're right. There is a spelling mistake in the method. See xbmc/xbmc/messaging/ApplicationMessenger.h

void RegisterReceveiver(IMessageTarget* target);

Sorry also in the comments is a mistake.

This comment has been minimized.

Copy link
@un1versal

un1versal Jul 22, 2015

Contributor

comments I dont really care but fixed in #7584 Ill update comments

CApplicationMessenger::Get().RegisterReceveiver(&g_playlistPlayer);
CApplicationMessenger::Get().RegisterReceveiver(&g_infoManager);
CApplicationMessenger::Get().RegisterReceveiver(&g_AEDSPManager);

for (int i = RES_HDTV_1080i; i <= RES_PAL60_16x9; i++)
{
g_graphicsContext.ResetScreenParameters((RESOLUTION)i);
Expand Down Expand Up @@ -1135,10 +1142,6 @@ bool CApplication::Initialize()
CDirectory::Create("special://xbmc/sounds");
}

CApplicationMessenger::Get().RegisterReceveiver(this);
CApplicationMessenger::Get().RegisterReceveiver(&g_playlistPlayer);
CApplicationMessenger::Get().RegisterReceveiver(&g_infoManager);

// load the language and its translated strings
if (!LoadLanguage(false))
return false;
Expand Down

0 comments on commit 161e359

Please sign in to comment.