Split screen: window 2's F1 audio output is overwritten by window 1's at every start

未关闭 适合新手
#989 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust
领域
backend, desktop

调研方向

从 launcher/src-tauri/src/coop_launch.rs 中的 prepare_windows() 开始。报告指出,该函数会将 controls.ini 复制到每个 split/N/controls.ini。阅读这项刷新如何处理 [audio] 设备和音量,然后将其行为与附带的变通补丁进行比较。完成标准是重启后每个窗口都保留各自的音频设备和音量。

由索引模型根据 Issue 内容生成。

描述

bug
What happened

In split screen, each window has its own controls.ini (window 2 uses split/2/controls.ini), and the F1 > Audio page lets each window pick its own output device. But at every start, prepare_windows() in launcher/src-tauri/src/coop_launch.rs copies the game folder's controls.ini over every split/N/controls.ini, so window 2's [audio] device (and volume) is replaced by window 1's. After a restart both windows always play on the same device.

Use case: I play split screen with a remote player through Parsec. I want window 1 on my headset and window 2 on a virtual device that Parsec captures, so each player only hears their own game. Windows' per-app output setting can't split them because both windows are the same pkp.exe.

What you expected

Each window keeps its own F1 Audio choice (output device and volume) across starts.

For reference, here is how I worked around it on my side (patch attached): prepare_windows still refreshes each window from controls.ini, but keeps the window's own [audio] device and volume. It works for me (window 1 on my headset, window 2 on another output, kept after restarts, and Parsec only gets player 2's sound). You know the code much better than me, so feel free to fix it differently, it's just in case it helps.

A nice follow-up could be an "Audio output" choice per player in the launcher's split screen card, next to Controller and Screen. Happy to open a PR if you prefer.

recompia-audio-par-fenetre.patch

Version

0.18.1

Platform

Windows PC

Update channel

Stable

GPU and driver version

NVIDIA GeForce RTX 5070 Ti, driver 621.14

pkp.log

Not a crash: the bug is in the launcher (prepare_windows in coop_launch.rs copies controls.ini over split/N/controls.ini at every start). pkp.log from a split screen session below.

pkp.log

Before you send
  • I searched the open and closed issues and this is not already reported.
  • My game dump is version 2.0.1a.
主要语言
C++
星标
224
派生
0
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

featureJosh/Recompia 的其他 Issue

查看 featureJosh/Recompia 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。