Cockpit: extend the gauge NULL-source guard to L4MFDSPLIT
The single-window cockpit (L4MFDSPLIT=1) wakes the gauge renderer off the pod just like the BT_DEV_GAUGES dev composite does; some attribute sources bind NULL there and AV'd in GaugeConnectionDirectOf. Widen the static dev-gauges gate to also trip on L4MFDSPLIT so those sources bind a static zero (reads 0 instead of faulting). The pod path binds every source, so this stays byte-unchanged there. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -203,9 +203,15 @@ template <class T> GaugeConnectionDirectOf<T>::GaugeConnectionDirectOf(
|
||||
//
|
||||
if (data_source == NULL)
|
||||
{
|
||||
// Desktop gauge modes (BT_DEV_GAUGES dev composite OR L4MFDSPLIT
|
||||
// single-window cockpit) wake the gauge renderer off the pod, where
|
||||
// some attribute sources bind NULL; bind a static zero so the gauge
|
||||
// reads 0 instead of AV'ing here (and in Update()). The pod path
|
||||
// binds every source, so this never triggers there -- byte-unchanged.
|
||||
static int s_devGauges = -1;
|
||||
if (s_devGauges < 0)
|
||||
s_devGauges = (getenv("BT_DEV_GAUGES") != NULL) ? 1 : 0;
|
||||
s_devGauges = (getenv("BT_DEV_GAUGES") != NULL ||
|
||||
getenv("L4MFDSPLIT") != NULL) ? 1 : 0;
|
||||
if (s_devGauges)
|
||||
{
|
||||
static T s_gaugeNullSource = T();
|
||||
|
||||
Reference in New Issue
Block a user