diff --git a/CMakeLists.txt b/CMakeLists.txt index dc688c0..73b575a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,11 +33,18 @@ pkg_check_modules(MPV REQUIRED mpv) pkg_check_modules(X11 x11) pkg_check_modules(Xext xext) + +option(PINEPHONE "make pinephone settings h" OFF) +if(PINEPHONE) +add_definitions(-DPINEPHONE) +endif() + option(USE_EXTERNAL_SPDLOG "use external spdlog" OFF) if(USE_EXTERNAL_SPDLOG) include_directories(${EXTERNAL_SPDLOG_PATH}/include) include_directories(${EXTERNAL_SPDLOG_PATH}) + include_directories(/app) else() execute_process( COMMAND git clone --depth 1 https://github.com/gabime/spdlog.git diff --git a/src/main.cpp b/src/main.cpp index 0e744f2..0110f93 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -82,11 +82,18 @@ int main(int argc, char* argv[]) bool ranFirstTimeSetup = settings.value("Setup/ranSetup", false).toBool(); #ifdef __linux__ + bool pinephone; +#ifdef PINEPHONE + pinephone = true; +#else + pinephone = false; +#endif + // WARNING, THIS IS A BIG HACK // this is only to make it so KittehPlayer works first try on pinephone. // TODO: launch a opengl window or use offscreen to see if GL_ARB_framebuffer_object // can be found - if (!(settings.value("Backend/disableSunxiCheck", false).toBool() || ranFirstTimeSetup)) { + if (!(settings.value("Backend/disableSunxiCheck", false).toBool() || ranFirstTimeSetup || pinephone)) { FILE* fd = popen("grep sun[x8]i /proc/modules", "r"); char buf[16]; if (fread(buf, 1, sizeof(buf), fd) > 0) {