emulator: B2 RIO lamp/button bezel on the VDB heads + explode-view polish
Draw the cockpit RIO buttons around the mono-MFD and radar heads (explode
layout), lit by the host-commanded lamp state -- the display side of the
in-fork glass cockpit. Live-validated 2026-07-24 (operator).
- vpxlog.cpp: per-head button bezel in pal_draw, reading serialrio's new
RIO_GetPanelState seam. The 5 MFD heads get red buttons (4 top / 4 bottom,
100px tall tucked under a grown 640x500 display so a 10px lip shows); the
radar gets amber Secondary/Screen side columns (6x 104px each) plus a
centered bottom indicator strip (the 4 spares). Lamp byte decoded to
off/dim/bright (vRIO RioLampState, brighter of the two brightness fields);
a press shows white-hot. No labels -- the MFD shows each button's function.
Also swapped the two upper-outer MFD window NAMES to match their (already
position-swapped) desktop locations.
- serialrio.{cpp,h}: RIO_GetPanelState(lamps, pressed) accessor -- returns
false when no rio port, so non-rio configs and other heads render normally.
- pod-launch: in explode (dev) layout the Division bridge is a normal, freely
movable window -- not pinned topmost (Focus.cs) and nudged to 8,40 so its
title bar clears the top of the screen (its client was at 0,0, pushing the
frame off-screen). Cockpit/kiosk keeps the topmost + 0,0 borderless look.
Only affects the explode layout and only when a serial=rio port is present.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -211,6 +211,12 @@ void RIO_HostFocusLost(void) {
|
||||
if (rio_instance) rio_instance->hostFocusLost();
|
||||
}
|
||||
|
||||
bool RIO_GetPanelState(uint8_t lamps[72], uint8_t pressed[72]) {
|
||||
if (!rio_instance) return false;
|
||||
rio_instance->getPanelState(lamps, pressed);
|
||||
return true;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
|
||||
CSerialRio::CSerialRio(Bitu id, CommandLine* cmd) : CSerial(id, cmd) {
|
||||
@@ -570,6 +576,14 @@ void CSerialRio::hostFocusLost() {
|
||||
releaseAllKeys();
|
||||
}
|
||||
|
||||
// panel snapshot for the in-fork lamp bezel (vpxlog reads this each frame)
|
||||
void CSerialRio::getPanelState(uint8_t lampsOut[72], uint8_t pressedOut[72]) {
|
||||
for (int i = 0; i < 72; i++) {
|
||||
lampsOut[i] = lamps[i];
|
||||
pressedOut[i] = holdCounts.count(i) ? 1 : 0; // addr held right now
|
||||
}
|
||||
}
|
||||
|
||||
void CSerialRio::releaseAllKeys() {
|
||||
std::set<int> keys = heldKeys;
|
||||
heldKeys.clear();
|
||||
|
||||
Reference in New Issue
Block a user