feat: simple global control for backlight/brightness and volume (#6684)
This commit is contained in:
@@ -280,7 +280,10 @@ bool RawSource::isStick(Board::Type board) const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool RawSource::isAvailable(const ModelData * const model, const GeneralSettings * const gs, Board::Type board) const
|
||||
bool RawSource::isAvailable(const ModelData * const model,
|
||||
const GeneralSettings * const gs,
|
||||
Board::Type board,
|
||||
const int flags) const
|
||||
{
|
||||
if (type == SOURCE_TYPE_NONE && index == 0)
|
||||
return true;
|
||||
@@ -392,6 +395,10 @@ bool RawSource::isAvailable(const ModelData * const model, const GeneralSettings
|
||||
gs->serialPort[GeneralSettings::SP_AUX2] == GeneralSettings::AUX_SERIAL_SPACEMOUSE))))
|
||||
return false;
|
||||
|
||||
if (type == SOURCE_TYPE_INPUT && (flags & AVAILABLE_CONTROLSRC) &&
|
||||
Boards::isInputGyroAxis(abs(index) - 1, board))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user