Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ English (US) release notes, mirroring CHANGELOG.md (Brazilian Portuguese). Befor
- **Browser (JoyChromium)** in the session menu, pinned right under ControlFS and working the same way: [JoyChromium](https://github.com/lippdev/joychromium) (the TV browser you drive with the controller) opens full screen over the game and, if it isn't installed, the first press downloads its newest release, checks its SHA-256 and installs it. Going back to the PC while it's open takes it out of full screen and leaves it as a window, tabs and all. (#175, #181)
- **Move the mouse pointer out of the way** (issue #172): when the launcher shows up on the TV, the pointer goes to the bottom-right corner of the game screen (twice, since Steam recenters it while opening) and goes back where it was when you return to the PC. On by default; turn it off in Settings or under System → When entering console mode. Based on @JarJarShinks' version in #173. (#177)
- Redesigned title bar: on the Console interface the background runs up to the top edge of the window (no grey strip) and the minimize, maximize and close buttons are white, with the same soft highlight as the interface's own buttons; on the Desktop interface the icon and name are larger and the buttons fill the bar's height. (#182)
- Console interface: new sounds. Move, confirm and back use glass and "minimize" sounds from Kenney's Interface Sounds pack (CC0), and switching tabs (LB / RB) gets its own sound, a crystal tick made by the Selene theme's sound script (MIT). The sounds play only with the controller (and the keyboard): mouse clicks, in the Console interface or the session menu, no longer make a sound. (#183)

### Fixes
- Custom app: Console Mode moves only the program's largest window to the game screen, instead of every window Windows reports as its main one; a tooltip is no longer stretched over the TV. (#175)
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Notas em português do Brasil; a versão em inglês (Estados Unidos) fica em `CH
- **Navegador (JoyChromium)** no menu da sessão, fixo logo abaixo do ControlFS e funcionando do mesmo jeito: o [JoyChromium](https://github.com/lippdev/joychromium) (o navegador para a TV que se usa com o controle) abre em tela cheia por cima do jogo e, se não estiver instalado, o primeiro clique baixa a versão mais recente, confere o SHA-256 e instala. Voltar ao PC com ele aberto o tira da tela cheia e o deixa como janela, sem perder as abas. (#175, #181)
- **Tirar o ponteiro do mouse do caminho** (issue #172): quando o iniciador aparece na TV, o ponteiro vai para o canto inferior direito da tela de jogo (duas vezes, porque a Steam o recentraliza ao abrir) e, ao voltar ao PC, volta para onde estava. Ligado por padrão; desligue em Ajustes ou em Sistema → Ao entrar no modo console. Baseado na versão de @JarJarShinks no #173. (#177)
- Barra de título redesenhada: na interface Console, o fundo vai até a borda de cima da janela (sem a faixa cinza) e os botões de minimizar, maximizar e fechar ficam brancos, com o mesmo realce suave dos botões da interface; na interface Desktop, o ícone e o nome ficam maiores e os botões ocupam a altura toda da barra. (#182)
- Interface Console: sons novos. Mover, confirmar e voltar usam sons de vidro e de "minimizar" do pacote Interface Sounds da Kenney (CC0), e trocar de aba (LB / RB) ganhou um som próprio, um tique de cristal gerado pelo script de sons do tema Selene (MIT). Os sons tocam só com o controle (e o teclado): clicar com o mouse, na interface Console ou no menu da sessão, não faz mais som. (#183)

### Correções
- Aplicativo personalizado: o Console Mode leva para a tela de jogo só a maior janela do programa, em vez de todas as que o Windows aponta como principal; uma dica de ferramenta não é mais esticada sobre a TV. (#175)
Expand Down
9 changes: 9 additions & 0 deletions THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ Até a versão 1.5, o Console Mode embutia o [MultiMonitorTool](https://www.nirs
|-------|------|----------------|
| [Inter](https://rsms.me/inter/) 4.1 | GitHub (SIL Open Font License 1.1) | Embarcada (`src/ConsoleMode/Assets/Fonts/InterVariable.ttf`) como fonte da interface Console. A licença vai junto, em `Inter-OFL.txt` |

## Sons da interface

Embarcados no executável (`src/ConsoleMode/Assets/Sounds`), convertidos para WAV mono de 44,1 kHz com o volume igualado.

| Som | Origem | Licença |
|-----|--------|---------|
| `move.wav` (`glass_002`), `confirm.wav` (`confirmation_001`), `back.wav` (`minimize_008`) | [Interface Sounds](https://kenney.nl/assets/interface-sounds), da Kenney | CC0 1.0 (domínio público; crédito opcional) |
| `tab.wav` (`cursor_c`) | Gerado pelo [`tools/make_sounds.py`](https://github.com/mattxslv/Selene/blob/main/tools/make_sounds.py) do [Selene](https://github.com/mattxslv/Selene), de Matthew Silva (mattxslv): síntese pura, sem amostras | MIT, Copyright (c) 2026 Matthew Silva |

## Limite de FPS (opcional)

| Ferramenta | Site | Uso no projeto |
Expand Down
5 changes: 4 additions & 1 deletion docs/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ Pré-condições: interface Console ativa (Ajustes → Interface → Console, ou

### Sons

- [ ] Há um som ao mover o foco, outro ao confirmar (A ou clique) e outro ao voltar (B); trocar de aba toca o de mover. Resultado: ______
- [ ] Há um som ao mover o foco, outro ao confirmar (A ou clique) e outro ao voltar (B). Resultado: ______

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This confirmation check still says a click should make a sound, contradicting the next checklist item and the new mouse-silent behavior. Please limit this check to controller/keyboard confirmation so the manual test has a single expected result.

- [ ] Trocar de aba com LB / RB (ou Page Up / Page Down) toca um som próprio, diferente do de mover. Resultado: ______
- [ ] Clicar com o mouse (numa aba, num bloco, num botão, numa linha de Sistema ou no menu da sessão) não faz som nenhum; o mesmo botão apertado pelo controle faz. Resultado: ______
- [ ] Os sons novos (vidro ao mover, confirmação, "minimizar" ao voltar e o cursor do Selene na aba) saem no mesmo volume, sem estalo no começo ou no fim. Resultado: ______
- [ ] Sistema/Ajustes → "Sons da interface" desligado: silêncio total. Resultado: ______
- [ ] Segurar o direcional não acumula sons (um novo interrompe o anterior). Resultado: ______

Expand Down
Binary file added src/ConsoleMode/Assets/Sounds/back.wav
Binary file not shown.
Binary file added src/ConsoleMode/Assets/Sounds/confirm.wav
Binary file not shown.
Binary file added src/ConsoleMode/Assets/Sounds/move.wav
Binary file not shown.
Binary file added src/ConsoleMode/Assets/Sounds/tab.wav
Binary file not shown.
1 change: 1 addition & 0 deletions src/ConsoleMode/ConsoleMode.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<ItemGroup>
<EmbeddedResource Include="..\..\assets\icon.ico" LogicalName="ConsoleMode.Assets.icon.ico" />
<EmbeddedResource Include="Assets\OtherApps\*.png" LogicalName="ConsoleMode.Assets.OtherApps.%(Filename)%(Extension)" />
<EmbeddedResource Include="Assets\Sounds\*.wav" LogicalName="ConsoleMode.Assets.Sounds.%(Filename)%(Extension)" />
<EmbeddedResource Include="..\..\artifacts\tools\rtss-cli*.exe" LogicalName="ConsoleMode.Tools.%(Filename)%(Extension)" />
<EmbeddedResource Include="Resources\Strings.pt-BR.json" WithCulture="false" LogicalName="ConsoleMode.Localization.Strings.pt-BR.json" />
<EmbeddedResource Include="Resources\Strings.en-US.json" WithCulture="false" LogicalName="ConsoleMode.Localization.Strings.en-US.json" />
Expand Down
5 changes: 4 additions & 1 deletion src/ConsoleMode/Services/UiSoundSynth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ public enum UiSound
/// <summary>Something was picked, opened or switched.</summary>
Confirm,
/// <summary>Went back or closed a panel.</summary>
Back
Back,
/// <summary>Switched to another tab of the console interface (LB / RB, or a click on a tab).</summary>
Tab
}

/// <summary>
Expand All @@ -26,6 +28,7 @@ public static class UiSoundSynth
private static Note[] Notes(UiSound sound) => sound switch
{
UiSound.Move => [new(1150, 1000, 45, 0.30)],
UiSound.Tab => [new(980, 1180, 55, 0.30)],
UiSound.Confirm => [new(740, 740, 55, 0.32), new(1110, 1110, 95, 0.34)],
_ => [new(820, 820, 50, 0.30), new(560, 540, 85, 0.30)]
};
Expand Down
18 changes: 16 additions & 2 deletions src/ConsoleMode/Services/UiSounds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace ConsoleMode.Services;

/// <summary>
/// Plays the console interface sounds (see <see cref="UiSoundSynth"/>) from memory through
/// Plays the console interface sounds (the ones shipped in Assets\Sounds, else <see cref="UiSoundSynth"/>) from memory through
/// winmm's PlaySound. Fire and forget: a new sound cuts the one still playing, and one that can't
/// play (no audio device, a driver error) is skipped, never an error for the user.
/// </summary>
Expand All @@ -27,7 +27,7 @@ public static void Play(UiSound sound)
{
if (!Buffers.TryGetValue(sound, out var handle))
{
handle = GCHandle.Alloc(UiSoundSynth.Wav(sound), GCHandleType.Pinned);
handle = GCHandle.Alloc(Embedded(sound) ?? UiSoundSynth.Wav(sound), GCHandleType.Pinned);
Buffers[sound] = handle;
}
// A new sound replaces the one playing, so quick moves keep up.
Expand All @@ -40,6 +40,20 @@ public static void Play(UiSound sound)
}
}

/// <summary>
/// The sound shipped with the app (Assets\Sounds: Kenney's CC0 "Interface Sounds" and a tick made by the Selene
/// theme's MIT sound script, see THIRD_PARTY_NOTICES.md), or null when it isn't there: the synthesized one plays instead.
/// </summary>
private static byte[]? Embedded(UiSound sound)
{
var name = $"ConsoleMode.Assets.Sounds.{sound.ToString().ToLowerInvariant()}.wav";
using var stream = typeof(UiSounds).Assembly.GetManifestResourceStream(name);
if (stream is null) return null;
using var copy = new MemoryStream();
stream.CopyTo(copy);
return copy.ToArray();
}

[DllImport("winmm.dll", EntryPoint = "PlaySoundW")]
private static extern bool PlaySound(nint sound, nint module, uint flags);
}
15 changes: 1 addition & 14 deletions src/ConsoleMode/SessionMenuWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,7 @@ public SessionMenuWindow(MainViewModel viewModel, ScreenRect? target)
card.StartBringIntoView();
};
Root.LostFocus += (_, e) => ScaleFocused(e.OriginalSource, grow: false);
// Mouse clicks sound like a confirm (the pad has its own sounds in the navigator).
Root.AddHandler(UIElement.PointerPressedEvent, new PointerEventHandler(OnPointerPressed), true);
// The sounds are the pad's (the navigator): mouse clicks stay silent.

ViewModel.PropertyChanged += OnViewModelChanged;
ViewModel.SessionPickerRefocus += FocusPickerSelection;
Expand Down Expand Up @@ -450,18 +449,6 @@ private static void ScaleFocused(object source, bool grow)
}
}

private void OnPointerPressed(object sender, PointerRoutedEventArgs e)
{
for (var node = e.OriginalSource as DependencyObject; node is not null; node = VisualTreeHelper.GetParent(node))
{
if (node is ButtonBase { IsEnabled: true })
{
UiSounds.Play(UiSound.Confirm);
return;
}
}
}

// ── Guided tour ──────────────────────────────────────────────────────────────────────────

private const double TourHolePadding = 6;
Expand Down
17 changes: 2 additions & 15 deletions src/ConsoleMode/Views/ConsoleHomeView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ public ConsoleHomeView()
SettingsRows.GotFocus += (_, e) => { if (e.OriginalSource is Control row) _lastSettingsRow = row; };
CategoryRail.GettingFocus += OnRailGettingFocus;
CategoryRail.AddHandler(UIElement.PointerPressedEvent, new PointerEventHandler((_, _) => _railPointerPressedAt = Environment.TickCount64), true);
// Mouse clicks on buttons sound like a confirm (the pad has its own sounds in the navigator).
Root.AddHandler(UIElement.PointerPressedEvent, new PointerEventHandler(OnPointerPressed), true);
// The sounds are the pad's (GamepadNavigator, LB / RB): mouse clicks stay silent.
ViewModel.PropertyChanged += OnViewModelChanged;
ViewModel.PickBackgroundImageRequested += () => _ = PickBackgroundImageAsync();
}
Expand Down Expand Up @@ -289,7 +288,7 @@ private void AnimateTab(int from, int to)
private void StepTab(int step)
{
if (ViewModel.IsConsoleActive || ViewModel.IsRolePanelOpen || ViewModel.IsPickerOpen || ViewModel.IsShortcutEditorOpen || ViewModel.IsConsoleTutorialOpen || ViewModel.IsControllerTestOpen) return;
if (ViewModel.StepConsoleTab(step)) UiSounds.Play(UiSound.Move);
if (ViewModel.StepConsoleTab(step)) UiSounds.Play(UiSound.Tab);
}

private void GoBack()
Expand Down Expand Up @@ -427,18 +426,6 @@ private static void ScaleTile(object source, float scale)
button.Scale = new Vector3(scale, scale, 1);
}

private void OnPointerPressed(object sender, PointerRoutedEventArgs e)
{
for (var node = e.OriginalSource as DependencyObject; node is not null; node = Microsoft.UI.Xaml.Media.VisualTreeHelper.GetParent(node))
{
if (node is Microsoft.UI.Xaml.Controls.Primitives.ButtonBase { IsEnabled: true })
{
UiSounds.Play(UiSound.Confirm);
return;
}
}
}

private static Microsoft.UI.Xaml.Input.FocusNavigationDirection? Arrow(VirtualKey key) => key switch
{
VirtualKey.Up => Microsoft.UI.Xaml.Input.FocusNavigationDirection.Up,
Expand Down
Loading