Fixes for the Raspberry Pi build.
The slowness problem is still there.
This commit is contained in:
parent
6cf749c82c
commit
3c0e460a23
2 changed files with 8 additions and 6 deletions
|
@ -43,6 +43,8 @@ if (RASPBERRY_PI)
|
||||||
message(STATUS "Will build for Raspberry Pi")
|
message(STATUS "Will build for Raspberry Pi")
|
||||||
include_directories(SYSTEM
|
include_directories(SYSTEM
|
||||||
/opt/vc/include
|
/opt/vc/include
|
||||||
|
/opt/vc/include/interface/vcos/pthreads
|
||||||
|
/opt/vc/include/interface/vmcs_host/linux
|
||||||
)
|
)
|
||||||
link_directories(
|
link_directories(
|
||||||
/opt/vc/lib
|
/opt/vc/lib
|
||||||
|
|
|
@ -115,6 +115,12 @@ namespace cloonel {
|
||||||
///------------------------------------------------------------------------
|
///------------------------------------------------------------------------
|
||||||
///------------------------------------------------------------------------
|
///------------------------------------------------------------------------
|
||||||
void SDLMain::InitSDL (LocalData& parInitSDL) {
|
void SDLMain::InitSDL (LocalData& parInitSDL) {
|
||||||
|
#if defined(RASPBERRY_PI)
|
||||||
|
assert(not parInitSDL.bcmInitialized);
|
||||||
|
bcm_host_init();
|
||||||
|
parInitSDL.bcmInitialized = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
parInitSDL.window = nullptr;
|
parInitSDL.window = nullptr;
|
||||||
parInitSDL.renderer = nullptr;
|
parInitSDL.renderer = nullptr;
|
||||||
parInitSDL.initialized = false;
|
parInitSDL.initialized = false;
|
||||||
|
@ -123,12 +129,6 @@ namespace cloonel {
|
||||||
throw std::runtime_error(SDL_GetError());
|
throw std::runtime_error(SDL_GetError());
|
||||||
parInitSDL.initialized = true;
|
parInitSDL.initialized = true;
|
||||||
|
|
||||||
#if defined(RASPBERRY_PI)
|
|
||||||
assert(not parInitSDL.bcmInitialized);
|
|
||||||
bcm_host_init();
|
|
||||||
parInitSDL.bcmInitialized = true;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(FORCE_OPENGLES)
|
#if defined(FORCE_OPENGLES)
|
||||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue