Skip to content

Commit

Permalink
[RBP] Fix for cachemembuffersize initialisation and multiple profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
popcornmix committed May 8, 2015
1 parent 7e29bfe commit 0bd0fd6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
9 changes: 7 additions & 2 deletions xbmc/linux/RBP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ CRBP::~CRBP()
delete m_DllBcmHost;
}

void CRBP::InitializeSettings()
{
if (g_advancedSettings.m_cacheMemBufferSize == ~0U)
g_advancedSettings.m_cacheMemBufferSize = m_arm_mem < 256 ? 1024 * 1024 * 2 : 1024 * 1024 * 20;
}

bool CRBP::Initialize()
{
CSingleLock lock (m_critSection);
Expand Down Expand Up @@ -83,8 +89,7 @@ bool CRBP::Initialize()
if (!m_gui_resolution_limit)
m_gui_resolution_limit = m_gpu_mem < 128 ? 720:1080;

if (g_advancedSettings.m_cacheMemBufferSize == ~0U)
g_advancedSettings.m_cacheMemBufferSize = m_arm_mem < 256 ? 1024 * 1024 * 2 : 1024 * 1024 * 20;
InitializeSettings();

// in case xbcm was restarted when suspended
ResumeVideoOutput();
Expand Down
1 change: 1 addition & 0 deletions xbmc/linux/RBP.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class CRBP
~CRBP();

bool Initialize();
void InitializeSettings();
void LogFirmwareVerison();
void Deinitialize();
int GetArmMem() { return m_arm_mem; }
Expand Down
7 changes: 6 additions & 1 deletion xbmc/settings/AdvancedSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
#if defined(TARGET_DARWIN_IOS)
#include "osx/DarwinUtils.h"
#endif
#if defined(TARGET_RASPBERRY_PI)
#include "linux/RBP.h"
#endif

using namespace ADDON;
using namespace XFILE;
Expand Down Expand Up @@ -413,7 +416,9 @@ void CAdvancedSettings::Initialize()
#endif

m_userAgent = g_sysinfo.GetUserAgent();

#ifdef TARGET_RASPBERRY_PI
g_RBP.InitializeSettings();
#endif
m_initialized = true;
}

Expand Down

0 comments on commit 0bd0fd6

Please sign in to comment.