Fixes for the Raspberry Pi build.

The slowness problem is still there.
This commit is contained in:
King_DuckZ 2014-08-07 11:29:04 +02:00
parent 6cf749c82c
commit 3c0e460a23
2 changed files with 8 additions and 6 deletions

View file

@ -43,6 +43,8 @@ if (RASPBERRY_PI)
message(STATUS "Will build for Raspberry Pi")
include_directories(SYSTEM
/opt/vc/include
/opt/vc/include/interface/vcos/pthreads
/opt/vc/include/interface/vmcs_host/linux
)
link_directories(
/opt/vc/lib

View file

@ -115,6 +115,12 @@ namespace cloonel {
///------------------------------------------------------------------------
///------------------------------------------------------------------------
void SDLMain::InitSDL (LocalData& parInitSDL) {
#if defined(RASPBERRY_PI)
assert(not parInitSDL.bcmInitialized);
bcm_host_init();
parInitSDL.bcmInitialized = true;
#endif
parInitSDL.window = nullptr;
parInitSDL.renderer = nullptr;
parInitSDL.initialized = false;
@ -123,12 +129,6 @@ namespace cloonel {
throw std::runtime_error(SDL_GetError());
parInitSDL.initialized = true;
#if defined(RASPBERRY_PI)
assert(not parInitSDL.bcmInitialized);
bcm_host_init();
parInitSDL.bcmInitialized = true;
#endif
#if defined(FORCE_OPENGLES)
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
#endif