Rename scale → scale_mode in protocol/struct layer; add control grouping future note

- `Proto_Display_Device_Info.scale` → `scale_mode`
- `Proto_Start_Display.scale` → `scale_mode`
- `PROTO_DISPLAY_CTRL_SCALE` → `PROTO_DISPLAY_CTRL_SCALE_MODE`
- `proto_write_start_display` param and all callers updated
- `on_display` callback param and all sites updated
- `Display_Slot.scale` → `scale_mode` in node
- Control name "Scale" → "Scale Mode"
- planning.md: add control grouping deferred decision

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-30 00:54:22 +00:00
parent 7777292dfd
commit 8fa2f33bad
5 changed files with 32 additions and 31 deletions

View File

@@ -420,7 +420,7 @@ struct App_Error proto_write_enum_devices_response(struct Transport_Conn *conn,
e = wbuf_i16(&b, d->win_y); if (!APP_IS_OK(e)) { goto fail; }
e = wbuf_u16(&b, d->win_w); if (!APP_IS_OK(e)) { goto fail; }
e = wbuf_u16(&b, d->win_h); if (!APP_IS_OK(e)) { goto fail; }
e = wbuf_u8 (&b, d->scale); if (!APP_IS_OK(e)) { goto fail; }
e = wbuf_u8 (&b, d->scale_mode); if (!APP_IS_OK(e)) { goto fail; }
e = wbuf_u8 (&b, d->anchor); if (!APP_IS_OK(e)) { goto fail; }
}
@@ -624,11 +624,11 @@ struct App_Error proto_read_stop_ingest(
}
/* START_DISPLAY: request_id(2) cmd(2) stream_id(2) win_x(2) win_y(2)
* win_w(2) win_h(2) scale(1) anchor(1) no_signal_fps(1) reserved(1) = 18 bytes */
* win_w(2) win_h(2) scale_mode(1) anchor(1) no_signal_fps(1) reserved(1) = 18 bytes */
struct App_Error proto_write_start_display(struct Transport_Conn *conn,
uint16_t request_id, uint16_t stream_id,
int16_t win_x, int16_t win_y, uint16_t win_w, uint16_t win_h,
uint8_t scale, uint8_t anchor, uint8_t no_signal_fps)
uint8_t scale_mode, uint8_t anchor, uint8_t no_signal_fps)
{
uint8_t buf[18];
uint32_t o = 0;
@@ -639,7 +639,7 @@ struct App_Error proto_write_start_display(struct Transport_Conn *conn,
put_i16(buf, o, win_y); o += 2;
put_u16(buf, o, win_w); o += 2;
put_u16(buf, o, win_h); o += 2;
put_u8 (buf, o, scale); o += 1;
put_u8 (buf, o, scale_mode); o += 1;
put_u8 (buf, o, anchor); o += 1;
put_u8 (buf, o, no_signal_fps); o += 1;
put_u8 (buf, o, 0); o += 1; /* reserved */
@@ -669,7 +669,7 @@ struct App_Error proto_read_start_display(
out->win_y = get_i16(payload, 8);
out->win_w = get_u16(payload, 10);
out->win_h = get_u16(payload, 12);
out->scale = get_u8 (payload, 14);
out->scale_mode = get_u8 (payload, 14);
out->anchor = get_u8 (payload, 15);
out->no_signal_fps = length >= 18 ? get_u8(payload, 16) : 0;
return APP_OK;
@@ -731,7 +731,7 @@ struct App_Error proto_read_enum_devices_response(
uint16_t stream_id,
int16_t win_x, int16_t win_y,
uint16_t win_w, uint16_t win_h,
uint8_t scale, uint8_t anchor,
uint8_t scale_mode, uint8_t anchor,
void *userdata),
void *userdata)
{
@@ -798,12 +798,12 @@ struct App_Error proto_read_enum_devices_response(
int16_t win_y = (int16_t)cur_u16(&c);
uint16_t win_w = cur_u16(&c);
uint16_t win_h = cur_u16(&c);
uint8_t scale = cur_u8(&c);
uint8_t anchor = cur_u8(&c);
uint8_t scale_mode = cur_u8(&c);
uint8_t anchor = cur_u8(&c);
CUR_CHECK(c);
if (on_display) {
on_display(device_id, stream_id, win_x, win_y,
win_w, win_h, scale, anchor, userdata);
win_w, win_h, scale_mode, anchor, userdata);
}
}
}