mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Can't autoupdate on OSX and Android.
This commit is contained in:
parent
8ee294a412
commit
488db9b4fb
|
@ -2485,7 +2485,9 @@ void CClient::RegisterInterfaces()
|
||||||
Kernel()->RegisterInterface(static_cast<IDemoPlayer*>(&m_DemoPlayer));
|
Kernel()->RegisterInterface(static_cast<IDemoPlayer*>(&m_DemoPlayer));
|
||||||
Kernel()->RegisterInterface(static_cast<IServerBrowser*>(&m_ServerBrowser));
|
Kernel()->RegisterInterface(static_cast<IServerBrowser*>(&m_ServerBrowser));
|
||||||
Kernel()->RegisterInterface(static_cast<IFetcher*>(&m_Fetcher));
|
Kernel()->RegisterInterface(static_cast<IFetcher*>(&m_Fetcher));
|
||||||
|
#if !defined(CONF_PLATFORM_MACOSX) && !defined(__ANDROID__)
|
||||||
Kernel()->RegisterInterface(static_cast<IAutoUpdate*>(&m_AutoUpdate));
|
Kernel()->RegisterInterface(static_cast<IAutoUpdate*>(&m_AutoUpdate));
|
||||||
|
#endif
|
||||||
Kernel()->RegisterInterface(static_cast<IFriends*>(&m_Friends));
|
Kernel()->RegisterInterface(static_cast<IFriends*>(&m_Friends));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2501,7 +2503,9 @@ void CClient::InitInterfaces()
|
||||||
m_pMap = Kernel()->RequestInterface<IEngineMap>();
|
m_pMap = Kernel()->RequestInterface<IEngineMap>();
|
||||||
m_pMasterServer = Kernel()->RequestInterface<IEngineMasterServer>();
|
m_pMasterServer = Kernel()->RequestInterface<IEngineMasterServer>();
|
||||||
m_pFetcher = Kernel()->RequestInterface<IFetcher>();
|
m_pFetcher = Kernel()->RequestInterface<IFetcher>();
|
||||||
|
#if !defined(CONF_PLATFORM_MACOSX) && !defined(__ANDROID__)
|
||||||
m_pAutoUpdate = Kernel()->RequestInterface<IAutoUpdate>();
|
m_pAutoUpdate = Kernel()->RequestInterface<IAutoUpdate>();
|
||||||
|
#endif
|
||||||
m_pStorage = Kernel()->RequestInterface<IStorage>();
|
m_pStorage = Kernel()->RequestInterface<IStorage>();
|
||||||
|
|
||||||
m_DemoEditor.Init(m_pGameClient->NetVersion(), &m_SnapshotDelta, m_pConsole, m_pStorage);
|
m_DemoEditor.Init(m_pGameClient->NetVersion(), &m_SnapshotDelta, m_pConsole, m_pStorage);
|
||||||
|
@ -2509,7 +2513,10 @@ void CClient::InitInterfaces()
|
||||||
m_ServerBrowser.SetBaseInfo(&m_NetClient[2], m_pGameClient->NetVersion());
|
m_ServerBrowser.SetBaseInfo(&m_NetClient[2], m_pGameClient->NetVersion());
|
||||||
|
|
||||||
m_Fetcher.Init();
|
m_Fetcher.Init();
|
||||||
|
|
||||||
|
#if !defined(CONF_PLATFORM_MACOSX) && !defined(__ANDROID__)
|
||||||
m_AutoUpdate.Init();
|
m_AutoUpdate.Init();
|
||||||
|
#endif
|
||||||
|
|
||||||
m_Friends.Init();
|
m_Friends.Init();
|
||||||
|
|
||||||
|
@ -2645,8 +2652,9 @@ void CClient::Run()
|
||||||
// update input
|
// update input
|
||||||
if(Input()->Update())
|
if(Input()->Update())
|
||||||
break; // SDL_QUIT
|
break; // SDL_QUIT
|
||||||
|
#if !defined(CONF_PLATFORM_MACOSX) && !defined(__ANDROID__)
|
||||||
AutoUpdate()->Update();
|
AutoUpdate()->Update();
|
||||||
|
#endif
|
||||||
|
|
||||||
// update sound
|
// update sound
|
||||||
Sound()->Update();
|
Sound()->Update();
|
||||||
|
|
|
@ -1271,6 +1271,7 @@ void CMenus::RenderServerbrowser(CUIRect MainView)
|
||||||
StatusBox.HSplitTop(5.0f, 0, &StatusBox);
|
StatusBox.HSplitTop(5.0f, 0, &StatusBox);
|
||||||
|
|
||||||
// version note
|
// version note
|
||||||
|
#if !defined(CONF_PLATFORM_MACOSX) && !defined(__ANDROID__)
|
||||||
StatusBox.HSplitBottom(15.0f, &StatusBox, &Button);
|
StatusBox.HSplitBottom(15.0f, &StatusBox, &Button);
|
||||||
char aBuf[64];
|
char aBuf[64];
|
||||||
int State = AutoUpdate()->GetCurrentState();
|
int State = AutoUpdate()->GetCurrentState();
|
||||||
|
@ -1319,7 +1320,19 @@ void CMenus::RenderServerbrowser(CUIRect MainView)
|
||||||
ProgressBar.w = (float)AutoUpdate()->GetCurrentPercent();
|
ProgressBar.w = (float)AutoUpdate()->GetCurrentPercent();
|
||||||
RenderTools()->DrawUIRect(&ProgressBar, vec4(1.0f, 1.0f, 1.0f, 0.5f), CUI::CORNER_ALL, 5.0f);
|
RenderTools()->DrawUIRect(&ProgressBar, vec4(1.0f, 1.0f, 1.0f, 0.5f), CUI::CORNER_ALL, 5.0f);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
StatusBox.HSplitBottom(15.0f, &StatusBox, &Button);
|
||||||
|
char aBuf[64];
|
||||||
|
if(str_comp(Client()->LatestVersion(), "0") != 0)
|
||||||
|
{
|
||||||
|
str_format(aBuf, sizeof(aBuf), Localize("DDNet %s is out! Download it at ddnet.tw!"), Client()->LatestVersion());
|
||||||
|
TextRender()->TextColor(1.0f, 0.4f, 0.4f, 1.0f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
str_format(aBuf, sizeof(aBuf), Localize("Current Version: %s"), GAME_VERSION);
|
||||||
|
UI()->DoLabelScaled(&Button, aBuf, 14.0f, -1);
|
||||||
|
TextRender()->TextColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
|
#endif
|
||||||
// button area
|
// button area
|
||||||
//StatusBox.VSplitRight(80.0f, &StatusBox, 0);
|
//StatusBox.VSplitRight(80.0f, &StatusBox, 0);
|
||||||
StatusBox.VSplitRight(170.0f, &StatusBox, &ButtonArea);
|
StatusBox.VSplitRight(170.0f, &StatusBox, &ButtonArea);
|
||||||
|
|
Loading…
Reference in a new issue