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
8 changes: 8 additions & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ English (US) release notes, mirroring CHANGELOG.md (Brazilian Portuguese). Befor

## [Unreleased]

## [1.6.0-beta.3]
### Heads-up: beta version, not the stable one
- This is a test version of 1.6. The stable version is still 1.5.1, and people on it don't get this update automatically: only those who turned on Settings → "Receive test versions (alpha and beta)" or are already on an alpha/beta. If something breaks, go back to 1.5.1 and report it with the feedback button (attach `consolemode.log`).

### Fixes
- Returning from Big Picture now closes only Steam's client window to the tray, keeping Steam running; games and other windows are preserved. (#131)
- Console interface settings: grouped controller options, a saved Automatic/Xbox/PlayStation button layout with a preview, and shortcut editing with cards and larger buttons. (#131)

## [1.6.0-beta.2]
### Heads-up: beta version, not the stable one
- This is a test version of 1.6. The stable version is still 1.5.1, and people on it don't get this update automatically: only those who turned on Settings → "Receive test versions (alpha and beta)" or are already on an alpha/beta. If something breaks, go back to 1.5.1 and report it with the feedback button (attach `consolemode.log`).
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ Notas em português do Brasil; a versão em inglês (Estados Unidos) fica em `CH

## [Unreleased]

## [1.6.0-beta.3]
### Atenção: versão beta, não é a estável
- Esta é uma versão de teste da 1.6. A versão estável continua sendo a 1.5.1, e quem está nela não recebe esta atualização automaticamente: só quem ligou Ajustes → "Receber versões de teste (alpha e beta)" ou já está numa alpha/beta. Se algo falhar, volte para a 1.5.1 e conte pelo botão de feedback (anexe o `consolemode.log`).

### Correções
- Voltar do Big Picture agora fecha apenas a janela da Steam para a bandeja, mantendo o cliente em execução; jogos e outras janelas são preservados. (#131)
- Ajustes da interface Console: opções de controle agrupadas, escolha persistente do layout Automático/Xbox/PlayStation com prévia e editor de atalhos com cartões e botões maiores. (#131)

## [1.6.0-beta.2]
### Atenção: versão beta, não é a estável
- Esta é uma versão de teste da 1.6. A versão estável continua sendo a 1.5.1, e quem está nela não recebe esta atualização automaticamente: só quem ligou Ajustes → "Receber versões de teste (alpha e beta)" ou já está numa alpha/beta. Se algo falhar, volte para a 1.5.1 e conte pelo botão de feedback (anexe o `consolemode.log`).
Expand Down
4 changes: 4 additions & 0 deletions docs/GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ You can also restore anytime from the tray (*Restore setup* / *Show window*). Wi

## Settings in Console mode

In **System → Controller**, choose the button layout: **Automatic**, **Xbox** or **PlayStation**. The preview and shortcut labels follow the choice, which is saved when you close the app. This changes the displayed symbols; the controller's inputs keep their existing mapping.

The **System** tab provides the same settings as desktop mode, including controller shortcuts, Playnite, Android TV, custom FPS and the data folder. Both interfaces share the saved values, which remain after restarting the app.

Open the shortcut action you want to configure, choose **Set** or **Change**, hold the desired combination on one controller and release the buttons. **Remove** disables that shortcut. During capture, controller buttons do not navigate the interface; use **Cancel** or **Esc** to stop capture. Outside capture, **B** leaves the editor. Address and custom FPS fields accept keyboard input.

When returning from Big Picture, **Send Steam to the tray when going back to the PC** closes the client window while keeping Steam running. With the option off, the desktop client is left open. Steam windows are left alone when a game is running or its state cannot be checked.

## Local control API

`consolemode://` links fire and forget. Tools that need an answer — a remote-control agent running as a Windows service, a Stream Deck plugin showing whether console mode is on — can use the named pipe `\\.\pipe\ConsoleMode.Control` while the app is running: send one JSON line, get one back.
Expand Down
4 changes: 4 additions & 0 deletions docs/GUIDE.pt-BR.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ Também dá para restaurar a qualquer momento pela bandeja (*Restaurar setup* /

## Configurações no modo Console

Em **Sistema → Controle**, escolha o layout dos botões: **Automático**, **Xbox** ou **PlayStation**. A prévia e os nomes dos atalhos acompanham a escolha, que fica salva ao fechar o app. Isso muda os símbolos exibidos; as entradas do controle mantêm o mapeamento existente.

A aba **Sistema** oferece os mesmos ajustes do modo PC, incluindo os atalhos do controle, Playnite, Android TV, FPS personalizado e pasta de dados. Os valores são compartilhados entre as duas interfaces e permanecem salvos ao reabrir o app.

Abra a ação de atalho que deseja configurar, escolha **Definir** ou **Alterar**, segure a combinação desejada em um único controle e solte os botões. **Remover** desativa aquele atalho. Durante a captura, os botões não navegam pela interface; use **Cancelar** ou **Esc** para interrompê-la. Fora da captura, **B** volta do editor. Campos de endereço e FPS personalizado aceitam digitação por teclado.

Ao voltar do Big Picture, **Mandar a Steam para a bandeja ao voltar ao PC** fecha a janela do cliente e mantém a Steam em execução. Com a opção desligada, o cliente desktop fica aberto. As janelas da Steam são preservadas quando há jogo rodando ou não é possível verificar esse estado.

## API de controle local

Os links `consolemode://` não dão resposta. Ferramentas que precisam de uma — um agente de controle remoto rodando como serviço do Windows, um plugin de Stream Deck que mostra se o modo console está ligado — podem usar o named pipe `\\.\pipe\ConsoleMode.Control` com o app aberto: envie uma linha JSON e receba outra.
Expand Down
33 changes: 28 additions & 5 deletions docs/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,19 +224,20 @@ Pré-condições: Ajustes → Interface = **Automático** (padrão).
- [ ] Um controle HID que manda leitura impossível (ex.: Switch Pro pelo driver genérico, com 6 ou mais botões "apertados" sozinhos) é ignorado mesmo quando também aparece em Windows.Gaming.Input: o app não navega nem inicia a sessão sozinho, e o log mostra `Controles: … ignorado: leitura inválida`. Reabrir o app tenta de novo. Resultado: ______
- [ ] Com um controle HID defeituoso e outro controle normal conectados, o defeituoso não gera ações pelo HID nem pela projeção Windows.Gaming.Input, e o controle normal continua navegando. Resultado: ______

## 3c. Fechar a Steam ao voltar ao PC
## 3c. Mandar a Steam para a bandeja ao voltar ao PC

Pré-condições: lançador = Steam Big Picture; Ajustes → "Fechar a Steam ao voltar ao PC" **ligado** (padrão); nenhum jogo aberto.
Pré-condições: lançador = Steam Big Picture; Ajustes → "Mandar a Steam para a bandeja ao voltar ao PC" **ligado** (padrão); nenhum jogo aberto.

- [ ] Voltar ao PC por cada caminho (botão "Voltar ao PC", menu da sessão, atalho do controle, `consolemode://stop`, tray → Restaurar): o **Big Picture fecha** e some da mesa, e a **Steam fecha sozinha** em alguns segundos (o ícone sai da bandeja, sem janela de erro). Resultado: ______
- [ ] Sair pelo próprio Big Picture (Sair → Sair do Big Picture): a mesa volta e a Steam também fecha. Resultado: ______
- [ ] A Steam **não é encerrada à força**: no Gerenciador de Tarefas ela some sem o aviso "o programa não está respondendo", e o log mostra `Steam: pedindo para fechar (sair normal)`. Resultado: ______
- [ ] Voltar ao PC por cada caminho (botão "Voltar ao PC", menu da sessão, atalho do controle, `consolemode://stop`, tray → Restaurar): o **Big Picture fecha**, a janela principal some e a **Steam continua em execução na bandeja**. Resultado: ______
- [ ] Sair pelo próprio Big Picture (Sair → Sair do Big Picture): a mesa volta e a Steam permanece na bandeja. Resultado: ______
- [ ] O processo da Steam continua no Gerenciador de Tarefas; clicar no ícone da bandeja reabre o cliente sem login nem reinício. Resultado: ______
- [ ] Com um **jogo da Steam rodando**: a Steam fica aberta e o log mostra `Steam: mantida aberta (jogo em execução, id …)`; o Big Picture ainda é fechado. Resultado: ______
- [ ] Com o ajuste **desligado**: o Big Picture fecha, a Steam fica aberta (`Steam: mantida aberta (desligado nos ajustes)`). Resultado: ______
- [ ] Desligar o ajuste, fechar e reabrir o Console Mode e iniciar uma sessão Big Picture: a preferência continua desligada e a Steam fica aberta. Resultado: ______
- [ ] Com o Steam aberto e o estado do jogo indisponível no Registro (valor `RunningAppID` ausente ou ilegível): a Steam fica aberta e o log informa que não foi possível verificar se há jogo em execução. Resultado: ______
- [ ] Steam **já fechada** antes de voltar: nada é aberto nem pedido (`Steam: não estava aberta`); a Steam não é iniciada de novo por engano. Resultado: ______
- [ ] Lançador Playnite ou Modo Xbox: a Steam não é tocada. Resultado: ______
- [ ] Janelas de jogo, chat/popups da Steam e outros aplicativos não recebem o pedido de fechamento da janela principal. Resultado: ______
- [ ] Se o Big Picture demorar a fechar (travado), a restauração da mesa continua e termina normalmente (o log mostra `Big Picture ainda aberto`). Resultado: ______

## 3c. Controle da TV: Google TV / Android TV (issue #75)
Expand Down Expand Up @@ -347,3 +348,25 @@ Pré-condições: 1.6 instalada por cima da 1.5, com a configuração da 1.5 (te
- [ ] Os cartões não exibem o botão X no canto. Quadrado/Delete continuam pedindo confirmação para fechar a janela selecionada. Resultado: ______
- [ ] A logo fornecida do ControlFS aparece no painel fixo do overlay, tanto instalado quanto ausente, inclusive no aplicativo publicado. Resultado: ______
- [ ] Com overlay aberto ou outro aplicativo em primeiro plano, a tela Console ao fundo não reage ao DualShock. Resultado: ______

## Ajustes da interface Console: controle e atalhos

### Layout dos botões

- [ ] Abra **Sistema > Controle > Layout dos botões** com um controle conectado.
- [ ] Em **Automático**, confirme que os símbolos acompanham o controle Xbox ou PlayStation conectado.
- [ ] Selecione **Xbox** e confirme que a prévia e as dicas usam A, B, X, Y, LB e RB.
- [ ] Selecione **PlayStation** e confirme que a prévia e as dicas usam ✕, ○, □, △, L1 e R1.
- [ ] Feche e abra o app; confirme que a escolha manual continua salva.
- [ ] Com dois tipos de controle disponíveis, troque o controle conectado em **Automático** e confirme que os símbolos acompanham o novo controle.
- [ ] Abra o menu da sessão e confirme que as dicas também respeitam o layout escolhido.

### Atalhos

- [ ] Abra cada um dos três atalhos com A e confirme que os cartões ficam legíveis em 1920×1080 e em uma janela de 960×760.
- [ ] Navegue entre **Definir/Alterar**, **Remover** e **Voltar** usando apenas o controle; confirme que o foco visível acompanha cada ação.
- [ ] Grave uma combinação, solte os botões e confirme que o valor aparece no cartão e na linha de Ajustes.
- [ ] Durante a gravação, pressione B/○ sozinho e confirme que a captura é cancelada sem alterar o atalho.
- [ ] Tente usar uma combinação já atribuída e confirme que a mensagem de conflito aparece inteira e não corta os botões.
- [ ] Reduza a altura da janela e confirme que o editor rola até **Voltar**, sem esconder os cartões.
- [ ] Feche o editor durante uma captura e confirme que ela para; reabra-o e confirme que nenhum botão fica preso em captura.
4 changes: 2 additions & 2 deletions src/ConsoleMode/ConsoleMode.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<Platform Condition="'$(Platform)' == ''">x64</Platform>
<Version>1.6.0-beta.2</Version>
<Version>1.6.0-beta.3</Version>
<AssemblyVersion>1.6.0.0</AssemblyVersion>
<FileVersion>1.6.0.0</FileVersion>
<InformationalVersion>1.6.0-beta.2</InformationalVersion>
<InformationalVersion>1.6.0-beta.3</InformationalVersion>
<AssemblyTitle>Console Mode</AssemblyTitle>
<Product>Console Mode</Product>
<Authors>lippdev</Authors>
Expand Down
56 changes: 47 additions & 9 deletions src/ConsoleMode/Controls/ShortcutPicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,59 @@ public sealed class ShortcutPicker : StackPanel
private ShortcutCapture? _capture;

/// <param name="stacked">In the setup dialog: left-aligned under the text instead of a right-hand column.</param>
public ShortcutPicker(MainViewModel vm, ShortcutSlot slot, bool stacked = false)
public ShortcutPicker(MainViewModel vm, ShortcutSlot slot, bool stacked = false, bool consoleStyle = false)
{
_vm = vm;
_slot = slot;
Spacing = 4;
var side = stacked ? HorizontalAlignment.Left : HorizontalAlignment.Right;
HorizontalAlignment = side;

var row = new StackPanel { Orientation = Orientation.Horizontal, Spacing = 8, HorizontalAlignment = side };
row.Children.Add(_value);
row.Children.Add(_set);
row.Children.Add(_clear);
Children.Add(row);
var side = stacked || consoleStyle ? HorizontalAlignment.Left : HorizontalAlignment.Right;
HorizontalAlignment = consoleStyle ? HorizontalAlignment.Stretch : side;

if (consoleStyle)
{
_value.FontSize = 23;
_value.FontWeight = Microsoft.UI.Text.FontWeights.SemiBold;
_value.TextAlignment = TextAlignment.Center;
_value.TextWrapping = TextWrapping.Wrap;
_value.MinWidth = 0;
var badge = new Border
{
Background = new SolidColorBrush(Color.FromArgb(42, 255, 255, 255)),
BorderBrush = new SolidColorBrush(Color.FromArgb(70, 255, 255, 255)),
BorderThickness = new Thickness(1),
CornerRadius = new CornerRadius(10),
Padding = new Thickness(12, 10, 12, 10),
Child = _value
};
Children.Add(badge);
_set.Style = Application.Current.Resources["ConsoleSmallButton"] as Style;
_clear.Style = Application.Current.Resources["ConsoleSmallButton"] as Style;
_set.Height = 52;
_clear.Height = 52;
_set.FontSize = 18;
_clear.FontSize = 18;
_set.HorizontalAlignment = HorizontalAlignment.Stretch;
_clear.HorizontalAlignment = HorizontalAlignment.Stretch;
Children.Add(_set);
Children.Add(_clear);
}
else
{
var row = new StackPanel { Orientation = Orientation.Horizontal, Spacing = 8, HorizontalAlignment = side };
row.Children.Add(_value);
row.Children.Add(_set);
row.Children.Add(_clear);
Children.Add(row);
}
Children.Add(_captureHint);
Children.Add(_error);
_captureHint.MaxWidth = consoleStyle ? 280 : 460;
_error.MaxWidth = consoleStyle ? 280 : 460;
if (consoleStyle)
{
_captureHint.FontSize = 18;
_error.FontSize = 18;
}

_timer = DispatcherQueue.GetForCurrentThread().CreateTimer();
_timer.Interval = TimeSpan.FromMilliseconds(40);
Expand Down
5 changes: 4 additions & 1 deletion src/ConsoleMode/Models/Models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public sealed class AppConfig
/// <summary>"auto" | "desktop" | "console": which interface to show (UiModeResolver).</summary>
public string UiMode { get; set; } = "auto";

/// <summary>"auto" | "xbox" | "playstation": which controller symbols to show in the console UI.</summary>
public string ControllerLayout { get; set; } = "auto";

/// <summary>The first-run tour was finished or skipped.</summary>
public bool TourDone { get; set; }

Expand Down Expand Up @@ -58,7 +61,7 @@ public sealed class AppConfig
public bool HomeButtonShortPress { get; set; }

/// <summary>
/// Going back to the PC also quits Steam (its own Exit, never a kill), unless a game is running.
/// Going back to the PC closes Steam's client window to the tray, unless a game is running.
/// Big Picture itself is always closed.
/// </summary>
public bool CloseSteamOnRestore { get; set; } = true;
Expand Down
6 changes: 6 additions & 0 deletions src/ConsoleMode/Native/NativeWindows.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ public static class NativeWindows
[DllImport("user32.dll")]
private static extern uint GetWindowThreadProcessId(nint hWnd, nint processId);

[DllImport("user32.dll")]
public static extern uint GetWindowThreadProcessId(nint hWnd, out uint processId);

[DllImport("user32.dll")]
public static extern nint GetWindow(nint hWnd, uint uCmd);

[DllImport("user32.dll")]
private static extern bool AttachThreadInput(uint idAttach, uint idAttachTo, bool fAttach);

Expand Down
10 changes: 8 additions & 2 deletions src/ConsoleMode/Resources/Strings.en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@
"ExitShortcutCard": "Controller shortcut to go back to the PC",
"ExitShortcutDescription": "During a session, hold this shortcut for 1 second to restore your desk and go back to the PC.",
"ShortcutHome": "Open Console Mode",
"ControllerSection": "Controller",
"ControllerLayoutCard": "Button layout",
"ControllerLayoutDescription": "Automatic follows the connected controller. You can also lock the Xbox or PlayStation symbols.",
"ControllerLayoutAuto": "Automatic",
"ControllerLayoutXbox": "Xbox (A, B, X, Y)",
"ControllerLayoutPlaystation": "PlayStation (✕, ○, □, △)",
"ShortcutMenu": "Session menu",
"ShortcutExit": "Back to the PC",
"ShortcutNotSet": "Not set",
Expand All @@ -122,8 +128,8 @@
"ShortcutsOnboardingBody": "No shortcut is on until you choose it. Pick a button or combination for each action, or leave it without one. Press Set, hold the buttons and let go. The same combination can't be used for two actions. You can change all of this later in Settings.",
"ShortcutsUseSuggested": "Use the suggested shortcuts",
"ShortcutsOnboardingDone": "Done",
"CloseSteamCard": "Close Steam when going back to the PC",
"CloseSteamDescription": "When you leave Big Picture or go back to the PC, Steam is asked to quit the normal way (its own Exit, never forced). Big Picture is always closed. Steam stays open if a game is running.",
"CloseSteamCard": "Send Steam to the tray when going back to the PC",
"CloseSteamDescription": "When you leave Big Picture, Steam receives a normal window-close request so it can move to the tray without exiting the process. If a game is running or its state cannot be checked, the window is left unchanged.",
"AutoStartControllerCard": "Enter when a controller connects",
"AutoStartControllerDescription": "With the app in the tray, turning on or plugging in a controller enters console mode. Ignores the first 15 s after opening and 30 s after restoring.",
"HomeButtonShortPressCard": "Short press of the Xbox button",
Expand Down
Loading
Loading