Changed the RPi preprocessor name from _RPI_ to RASPBERRY_PI.

This commit is contained in:
Leon Styhre 2022-04-19 17:29:29 +02:00
parent 954f1aa4f8
commit cad06bd841
4 changed files with 13 additions and 13 deletions

View file

@ -289,7 +289,7 @@ if(STEAM_DECK)
endif() endif()
if(RPI) if(RPI)
add_compile_definitions(_RPI_) add_compile_definitions(RASPBERRY_PI)
endif() endif()
if(BUNDLED_CERTS) if(BUNDLED_CERTS)

View file

@ -17,13 +17,13 @@
#include <SDL2/SDL_events.h> #include <SDL2/SDL_events.h>
#if defined(_RPI_) #if defined(RASPBERRY_PI)
extern "C" { extern "C" {
#include <interface/vmcs_host/vc_cecservice.h> #include <interface/vmcs_host/vc_cecservice.h>
#include <interface/vmcs_host/vc_tvservice.h> #include <interface/vmcs_host/vc_tvservice.h>
#include <interface/vmcs_host/vchost.h> #include <interface/vmcs_host/vchost.h>
} }
#endif // _RPI_ #endif // RASPBERRY_PI
#endif // HAVE_LIBCEC #endif // HAVE_LIBCEC
// Hack for CEC support. // 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; LOG(LogDebug) << "CECInput::onLogMessage message: " << message->message;
} }
#if defined(_RPI_) #if defined(RASPBERRY_PI)
static void vchi_tv_and_cec_init() static void vchi_tv_and_cec_init()
{ {
VCHI_INSTANCE_T vchi_instance; VCHI_INSTANCE_T vchi_instance;
@ -75,18 +75,18 @@ static void vchi_tv_and_cec_deinit()
vc_vchi_cec_stop(); vc_vchi_cec_stop();
vc_vchi_tv_stop(); vc_vchi_tv_stop();
} }
#endif // _RPI_ #endif // RASPBERRY_PI
#endif // HAVE_LIBCEC #endif // HAVE_LIBCEC
CECInput::CECInput() CECInput::CECInput()
: mlibCEC(nullptr) : mlibCEC(nullptr)
{ {
#if defined(HAVE_LIBCEC) #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). // 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_deinit();
vchi_tv_and_cec_init(); vchi_tv_and_cec_init();
#endif // _RPI_ #endif // RASPBERRY_PI
CEC::ICECCallbacks callbacks; CEC::ICECCallbacks callbacks;
CEC::libcec_configuration config; CEC::libcec_configuration config;
@ -147,10 +147,10 @@ CECInput::~CECInput()
mlibCEC = nullptr; 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). // Deinit vchi tv and CEC in case we are going to launch another app using CEC (like Kodi).
vchi_tv_and_cec_deinit(); vchi_tv_and_cec_deinit();
#endif // _RPI_ #endif // RASPBERRY_PI
#endif // HAVE_LIBCEC #endif // HAVE_LIBCEC
} }

View file

@ -144,7 +144,7 @@ void Settings::setDefaults()
// UI settings -> media viewer settings. // UI settings -> media viewer settings.
mBoolMap["MediaViewerKeepVideoRunning"] = {true, true}; mBoolMap["MediaViewerKeepVideoRunning"] = {true, true};
mBoolMap["MediaViewerStretchVideos"] = {false, false}; mBoolMap["MediaViewerStretchVideos"] = {false, false};
#if defined(_RPI_) #if defined(RASPBERRY_PI)
mBoolMap["MediaViewerVideoScanlines"] = {false, false}; mBoolMap["MediaViewerVideoScanlines"] = {false, false};
#else #else
mBoolMap["MediaViewerVideoScanlines"] = {true, true}; mBoolMap["MediaViewerVideoScanlines"] = {true, true};
@ -171,7 +171,7 @@ void Settings::setDefaults()
mIntMap["ScreensaverSwapVideoTimeout"] = {0, 0}; mIntMap["ScreensaverSwapVideoTimeout"] = {0, 0};
mBoolMap["ScreensaverStretchVideos"] = {false, false}; mBoolMap["ScreensaverStretchVideos"] = {false, false};
mBoolMap["ScreensaverVideoGameInfo"] = {true, true}; mBoolMap["ScreensaverVideoGameInfo"] = {true, true};
#if defined(_RPI_) #if defined(RASPBERRY_PI)
mBoolMap["ScreensaverVideoScanlines"] = {false, false}; mBoolMap["ScreensaverVideoScanlines"] = {false, false};
#else #else
mBoolMap["ScreensaverVideoScanlines"] = {true, true}; mBoolMap["ScreensaverVideoScanlines"] = {true, true};
@ -217,7 +217,7 @@ void Settings::setDefaults()
mStringMap["MediaDirectory"] = {"", ""}; mStringMap["MediaDirectory"] = {"", ""};
#if defined(STEAM_DECK) #if defined(STEAM_DECK)
mIntMap["MaxVRAM"] = {512, 512}; mIntMap["MaxVRAM"] = {512, 512};
#elif defined(_RPI_) #elif defined(RASPBERRY_PI)
mIntMap["MaxVRAM"] = {184, 184}; mIntMap["MaxVRAM"] = {184, 184};
#else #else
mIntMap["MaxVRAM"] = {256, 256}; mIntMap["MaxVRAM"] = {256, 256};

View file

@ -105,7 +105,7 @@ namespace Utils
returnValue = pclose(commandPipe); returnValue = pclose(commandPipe);
#if defined(_RPI_) #if defined(RASPBERRY_PI)
// Hack to avoid that the application window occasionally loses focus when returning // 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. // from a game, which only seems to happen on Raspberry Pi OS 10.
SDL_Delay(50); SDL_Delay(50);