mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-23 21:47:10 +02:00
UI: Dump DLC RomFS.
You can access this in the Manage DLC screen, it's the new button on each DLC line. Closes #548
This commit is contained in:
parent
a1c0c70ec2
commit
b360f4e721
3 changed files with 168 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
||||
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
||||
xmlns:pi="using:Projektanker.Icons.Avalonia"
|
||||
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
|
||||
xmlns:models="clr-namespace:Ryujinx.Ava.Common.Models"
|
||||
Width="500"
|
||||
|
@ -89,7 +90,12 @@
|
|||
<ListBox.DataTemplates>
|
||||
<DataTemplate
|
||||
DataType="models:DownloadableContentModel">
|
||||
<Panel Margin="10">
|
||||
<Panel Margin="10" Background="Transparent">
|
||||
<Panel.ContextFlyout>
|
||||
<Flyout ShowMode="TransientWithDismissOnPointerMoveAway">
|
||||
|
||||
</Flyout>
|
||||
</Panel.ContextFlyout>
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<Grid
|
||||
Grid.Column="0" ColumnDefinitions="*,Auto">
|
||||
|
@ -119,6 +125,15 @@
|
|||
Spacing="10"
|
||||
Orientation="Horizontal"
|
||||
HorizontalAlignment="Right">
|
||||
<Button
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
Padding="10"
|
||||
MinWidth="0"
|
||||
MinHeight="0"
|
||||
Click="DlcItem_DumpRomfs">
|
||||
<ui:SymbolIcon Symbol="MoveToFolder"/>
|
||||
</Button>
|
||||
<Button
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
|
|
|
@ -2,6 +2,8 @@ using Avalonia.Controls;
|
|||
using Avalonia.Interactivity;
|
||||
using Avalonia.Styling;
|
||||
using FluentAvalonia.UI.Controls;
|
||||
using LibHac.Tools.FsSystem.NcaUtils;
|
||||
using Ryujinx.Ava.Common;
|
||||
using Ryujinx.Ava.Common.Locale;
|
||||
using Ryujinx.Ava.Common.Models;
|
||||
using Ryujinx.Ava.UI.ViewModels;
|
||||
|
@ -93,5 +95,18 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async void DlcItem_DumpRomfs(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is not Button { DataContext: DownloadableContentModel dlc }) return;
|
||||
if (RyujinxApp.MainWindow.ViewModel is not { } viewModel)
|
||||
return;
|
||||
|
||||
await ApplicationHelper.ExtractAoc(
|
||||
viewModel.StorageProvider,
|
||||
NcaSectionType.Data,
|
||||
dlc.ContainerPath,
|
||||
dlc.FileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue