diff --git a/CMakeLists.txt b/CMakeLists.txt index 829563ed6..7b8befc08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -289,7 +289,7 @@ if(STEAM_DECK) endif() if(RPI) - add_compile_definitions(_RPI_) + add_compile_definitions(RASPBERRY_PI) endif() if(BUNDLED_CERTS) diff --git a/es-core/src/CECInput.cpp b/es-core/src/CECInput.cpp index 70dc87eca..8a2e2d50a 100644 --- a/es-core/src/CECInput.cpp +++ b/es-core/src/CECInput.cpp @@ -17,13 +17,13 @@ #include -#if defined(_RPI_) +#if defined(RASPBERRY_PI) extern "C" { #include #include #include } -#endif // _RPI_ +#endif // RASPBERRY_PI #endif // HAVE_LIBCEC // Hack for CEC support. @@ -59,7 +59,7 @@ static void onLogMessage(void* /*cbParam*/, const CEC::cec_log_message* message) LOG(LogDebug) << "CECInput::onLogMessage message: " << message->message; } -#if defined(_RPI_) +#if defined(RASPBERRY_PI) static void vchi_tv_and_cec_init() { VCHI_INSTANCE_T vchi_instance; @@ -75,18 +75,18 @@ static void vchi_tv_and_cec_deinit() vc_vchi_cec_stop(); vc_vchi_tv_stop(); } -#endif // _RPI_ +#endif // RASPBERRY_PI #endif // HAVE_LIBCEC CECInput::CECInput() : mlibCEC(nullptr) { #if defined(HAVE_LIBCEC) -#if defined(_RPI_) +#if defined(RASPBERRY_PI) // Restart vchi tv and CEC in case we just came back from another app using CEC (like Kodi). vchi_tv_and_cec_deinit(); vchi_tv_and_cec_init(); -#endif // _RPI_ +#endif // RASPBERRY_PI CEC::ICECCallbacks callbacks; CEC::libcec_configuration config; @@ -147,10 +147,10 @@ CECInput::~CECInput() mlibCEC = nullptr; } -#if defined(_RPI_) +#if defined(RASPBERRY_PI) // Deinit vchi tv and CEC in case we are going to launch another app using CEC (like Kodi). vchi_tv_and_cec_deinit(); -#endif // _RPI_ +#endif // RASPBERRY_PI #endif // HAVE_LIBCEC } diff --git a/es-core/src/Settings.cpp b/es-core/src/Settings.cpp index a5ccb3ab1..08828f9f0 100644 --- a/es-core/src/Settings.cpp +++ b/es-core/src/Settings.cpp @@ -144,7 +144,7 @@ void Settings::setDefaults() // UI settings -> media viewer settings. mBoolMap["MediaViewerKeepVideoRunning"] = {true, true}; mBoolMap["MediaViewerStretchVideos"] = {false, false}; -#if defined(_RPI_) +#if defined(RASPBERRY_PI) mBoolMap["MediaViewerVideoScanlines"] = {false, false}; #else mBoolMap["MediaViewerVideoScanlines"] = {true, true}; @@ -171,7 +171,7 @@ void Settings::setDefaults() mIntMap["ScreensaverSwapVideoTimeout"] = {0, 0}; mBoolMap["ScreensaverStretchVideos"] = {false, false}; mBoolMap["ScreensaverVideoGameInfo"] = {true, true}; -#if defined(_RPI_) +#if defined(RASPBERRY_PI) mBoolMap["ScreensaverVideoScanlines"] = {false, false}; #else mBoolMap["ScreensaverVideoScanlines"] = {true, true}; @@ -217,7 +217,7 @@ void Settings::setDefaults() mStringMap["MediaDirectory"] = {"", ""}; #if defined(STEAM_DECK) mIntMap["MaxVRAM"] = {512, 512}; -#elif defined(_RPI_) +#elif defined(RASPBERRY_PI) mIntMap["MaxVRAM"] = {184, 184}; #else mIntMap["MaxVRAM"] = {256, 256}; diff --git a/es-core/src/utils/PlatformUtil.cpp b/es-core/src/utils/PlatformUtil.cpp index f0be88faf..9bc664b37 100644 --- a/es-core/src/utils/PlatformUtil.cpp +++ b/es-core/src/utils/PlatformUtil.cpp @@ -105,7 +105,7 @@ namespace Utils returnValue = pclose(commandPipe); -#if defined(_RPI_) +#if defined(RASPBERRY_PI) // Hack to avoid that the application window occasionally loses focus when returning // from a game, which only seems to happen on Raspberry Pi OS 10. SDL_Delay(50);