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

## [Unreleased]

## [1.6.0-alpha.5]

### Fixes
- Console screen: read DualShock input directly over HID; overlay: navigate from the sidebar to windows, remove the cards' X button and display the ControlFS logo. (#130)


## [1.6.0-alpha.4]
### What's new
- Settings → TV: console mode turns a Google TV / Android TV on over the network and switches to the PC's HDMI input; it can also put the TV in standby on restore. (#126)
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Notas em português do Brasil; a versão em inglês (Estados Unidos) fica em `CH

## [Unreleased]

## [1.6.0-alpha.5]

### Correções
- Tela Console: leitura direta do DualShock por HID; overlay: navegação da lateral para as janelas, remoção do X dos cartões e logo do ControlFS. (#130)


## [1.6.0-alpha.4]
### Novidades
- Ajustes → TV: o modo console liga a Google TV / Android TV pela rede e troca para a entrada HDMI do PC; também pode colocá-la em espera ao restaurar. (#126)
Expand Down
13 changes: 13 additions & 0 deletions docs/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,3 +321,16 @@ Pré-condições: 1.6 instalada por cima da 1.5, com a configuração da 1.5 (te
- [ ] Playnite lento para abrir (troca a janela de carregamento pela principal): o app não volta ao PC sozinho e só restaura a mesa quando o Playnite fecha. Resultado: ______
- [ ] Fechar o app no meio da sessão e abrir de novo: "Restaurar setup" traz a mesa de volta a partir do backup. Resultado: ______
- [ ] Um backup da mesa feito pela 1.5 (sessão iniciada na 1.5, app atualizado antes de restaurar) é restaurado pela 1.6. Resultado: ______

## Regressão: DualShock e navegação entre painéis do menu

- [ ] DualShock 4 por USB, sem DS4Windows/Steam Input: na tela Console, D-pad e analógico movem o foco; ✕ confirma, ○ volta e L1/R1 trocam abas. Resultado: ______
- [ ] Repetir por Bluetooth e com Steam Input/DS4Windows ligado: cada toque produz uma única ação, sem movimento em repouso. Resultado: ______
- [ ] Com um Xbox também conectado, repetir a navegação com o DualShock. Resultado: ______
- [ ] Reconectar o DualShock com a tela Console aberta: a navegação volta a responder. Resultado: ______
- [ ] Durante o jogo, Share + △ (Select + Y) abre o overlay; → em uma opção lateral leva ao primeiro cartão de janela e ✕ ativa a janela escolhida. Resultado: ______
- [ ] No primeiro cartão de uma coluna, ← retorna à opção lateral de origem; ↑/↓ e ←/→ navegam pelos demais cartões, inclusive com rolagem. Resultado: ______
- [ ] Com seletor de sessão ou confirmação de fechamento aberto, as direções ficam dentro do diálogo. Sem janelas abertas, → não perde o foco. Resultado: ______
- [ ] 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: ______
Binary file added src/ConsoleMode/Assets/OtherApps/controlfs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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-alpha.4</Version>
<Version>1.6.0-alpha.5</Version>
<AssemblyVersion>1.6.0.0</AssemblyVersion>
<FileVersion>1.6.0.0</FileVersion>
<InformationalVersion>1.6.0-alpha.4</InformationalVersion>
<InformationalVersion>1.6.0-alpha.5</InformationalVersion>
<AssemblyTitle>Console Mode</AssemblyTitle>
<Product>Console Mode</Product>
<Authors>lippdev</Authors>
Expand Down
9 changes: 3 additions & 6 deletions src/ConsoleMode/SessionMenuWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@
</Button.Background>
<Grid ColumnSpacing="16">
<Grid.ColumnDefinitions><ColumnDefinition Width="Auto"/><ColumnDefinition Width="*"/></Grid.ColumnDefinitions>
<Border Style="{StaticResource RowIcon}"><FontIcon Glyph="&#xE8B7;" FontSize="19"/></Border>
<Border Width="72" Height="48" CornerRadius="8">
<Image Source="{x:Bind ViewModel.ControlFsLogo}" Stretch="Uniform"/>
</Border>
<StackPanel Grid.Column="1" VerticalAlignment="Center" Spacing="2">
<TextBlock Style="{StaticResource TileValue}" FontSize="18" Text="{x:Bind ViewModel.Texts.ControlFsCard, Mode=OneWay}"/>
<TextBlock Style="{StaticResource TileLabel}" FontSize="14" Text="{x:Bind ViewModel.ControlFsRowText, Mode=OneWay}"/>
Expand Down Expand Up @@ -293,11 +295,6 @@
</StackPanel>
</Grid>
</Button>
<Button IsTabStop="False" Width="40" Height="40" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top"
Margin="0,7,7,0" Background="{ThemeResource MenuVeil}" Foreground="White" Click="CloseCardClick"
DataContext="{Binding}">
<FontIcon Glyph="&#xE711;" FontSize="16"/>
</Button>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
Expand Down
34 changes: 28 additions & 6 deletions src/ConsoleMode/SessionMenuWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ public SessionMenuWindow(MainViewModel viewModel, ScreenRect? target)
UiSounds.Play(UiSound.Move);
return true;
}
// Cross into the grid explicitly; spatial focus may prefer another sidebar row.
if (!_editingVolume && direction == FocusNavigationDirection.Right && !ViewModel.IsSessionPickerOpen
&& Root.XamlRoot is { } root
&& FocusManager.GetFocusedElement(root) is DependencyObject focused
&& IsInside(SidebarPanel, focused) && FocusFirstWindowCard())
{
UiSounds.Play(UiSound.Move);
return true;
}
if (!_editingVolume) return false;
if (direction == FocusNavigationDirection.Left) { ViewModel.ChangeVolume(-1); UiSounds.Play(UiSound.Move); }
else if (direction == FocusNavigationDirection.Right) { ViewModel.ChangeVolume(1); UiSounds.Play(UiSound.Move); }
Expand Down Expand Up @@ -177,6 +186,8 @@ public SessionMenuWindow(MainViewModel viewModel, ScreenRect? target)
{
ScaleFocused(e.OriginalSource, grow: true);
if (e.OriginalSource is Control focused && IsInside(SidebarPanel, focused)) _lastSidebarFocus = focused;
if (e.OriginalSource is FrameworkElement { DataContext: SwitchWindowItem } card)
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).
Expand Down Expand Up @@ -448,6 +459,23 @@ private DependencyObject RegionOfFocus()
return Root;
}

/// <summary>Enter the windows grid even when spatial focus cannot reach it from the sidebar.</summary>
private bool FocusFirstWindowCard()
{
SwitcherList.UpdateLayout();
for (var i = 0; i < ViewModel.SwitcherWindows.Count; i++)
{
if (SwitcherList.ContainerFromIndex(i) is { } container
&& FocusManager.FindFirstFocusableElement(container) is Control card
&& card.Focus(FocusState.Keyboard))
{
card.StartBringIntoView();
return true;
}
}
return false;
}

/// <summary>True when the focus is on a window card with no card to its left (the first column of the grid).</summary>
private bool IsOnLeftmostCard()
{
Expand Down Expand Up @@ -504,12 +532,6 @@ private async void ConfirmCloseClick(object sender, RoutedEventArgs e)

private void CancelCloseClick(object sender, RoutedEventArgs e) => CancelCloseConfirmation();

private void CloseCardClick(object sender, RoutedEventArgs e)
{
if (sender is FrameworkElement { DataContext: SwitchWindowItem item })
ShowCloseConfirmation(item, ViewModel.SwitcherWindows.IndexOf(item));
}

/// <summary>Keep focus on the target while the close request is pending, then move to a neighbor if it closes.</summary>
private async Task CloseAndRefocusAsync(SwitchWindowItem item, int index)
{
Expand Down
2 changes: 2 additions & 0 deletions src/ConsoleMode/ViewModels/MainViewModel.OtherApps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ public partial class MainViewModel
{
private ImageSource? _wakeOnLogo;
private ImageSource? _nextBoostLogo;
private ImageSource? _controlFsLogo;

public ImageSource? WakeOnLogo => _wakeOnLogo ??= LoadLogo("wakeon.png");
public ImageSource? NextBoostLogo => _nextBoostLogo ??= LoadLogo("nextboost.png");
public ImageSource? ControlFsLogo => _controlFsLogo ??= LoadLogo("controlfs.png");

/// <summary>Embedded, so the installed and portable builds need no loose files.</summary>
private static BitmapImage? LoadLogo(string file)
Expand Down
3 changes: 2 additions & 1 deletion src/ConsoleMode/Views/ConsoleHomeView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ private async Task PickBackgroundImageAsync()
private void OnLoaded(object sender, RoutedEventArgs e)
{
_navigator ??= new GamepadNavigator(DispatcherQueue, this,
App.MainWindowInstance is { } w ? WinRT.Interop.WindowNative.GetWindowHandle(w) : 0);
App.MainWindowInstance is { } w ? WinRT.Interop.WindowNative.GetWindowHandle(w) : 0,
readSonyHid: true);
_navigator.SearchRoot = () =>
ViewModel.IsControllerTestOpen ? ControllerTestPanel
: ViewModel.IsConsoleTutorialOpen ? ConsoleTutorialPanel
Expand Down
Loading