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()
if(RPI)
add_compile_definitions(_RPI_)
add_compile_definitions(RASPBERRY_PI)
endif()
if(BUNDLED_CERTS)

View file

@ -17,13 +17,13 @@
#include <SDL2/SDL_events.h>
#if defined(_RPI_)
#if defined(RASPBERRY_PI)
extern "C" {
#include <interface/vmcs_host/vc_cecservice.h>
#include <interface/vmcs_host/vc_tvservice.h>
#include <interface/vmcs_host/vchost.h>
}
#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
}

View file

@ -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};

View file

@ -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);