forked from MeloNX/MeloNX
Update src/MeloNX/MeloNX/App/Views/GamesList/GameListView.swift
This commit is contained in:
parent
08ee9b18ea
commit
e79fd46b23
@ -18,6 +18,7 @@ struct GameLibraryView: View {
|
|||||||
// @State var importDLCs = false
|
// @State var importDLCs = false
|
||||||
@State private var searchText = ""
|
@State private var searchText = ""
|
||||||
@State private var isSearching = false
|
@State private var isSearching = false
|
||||||
|
@State private var showRMFWAlert = false
|
||||||
@AppStorage("recentGames") private var recentGamesData: Data = Data()
|
@AppStorage("recentGames") private var recentGamesData: Data = Data()
|
||||||
@State private var recentGames: [Game] = []
|
@State private var recentGames: [Game] = []
|
||||||
@Environment(\.colorScheme) var colorScheme
|
@Environment(\.colorScheme) var colorScheme
|
||||||
@ -168,13 +169,23 @@ struct GameLibraryView: View {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
Menu("Firmware") {
|
Menu("Firmware") {
|
||||||
Button {
|
Button {
|
||||||
|
showRMFWAlert = true
|
||||||
|
} label: {
|
||||||
|
Text("Remove Firmware")
|
||||||
|
}
|
||||||
|
.alert(isPresented: $showRMFWAlert) {
|
||||||
|
Alert(
|
||||||
|
title: Text("Are you sure?"),
|
||||||
|
message: Text("Do you really want to remove the firmware?"),
|
||||||
|
primaryButton: .destructive(Text("Yes")) {
|
||||||
Ryujinx.shared.removeFirmware()
|
Ryujinx.shared.removeFirmware()
|
||||||
let firmware = Ryujinx.shared.fetchFirmwareVersion()
|
let firmware = Ryujinx.shared.fetchFirmwareVersion()
|
||||||
firmwareversion = (firmware == "" ? "0" : firmware)
|
firmwareversion = (firmware == "" ? "0" : firmware)
|
||||||
} label: {
|
},
|
||||||
Text("Remove Firmware")
|
secondaryButton: .cancel()
|
||||||
}
|
)
|
||||||
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
let game = Game(containerFolder: URL(string: "none")!, fileType: .item, fileURL: URL(string: "MiiMaker")!, titleName: "Mii Maker", titleId: "0", developer: "Nintendo", version: firmwareversion)
|
let game = Game(containerFolder: URL(string: "none")!, fileType: .item, fileURL: URL(string: "MiiMaker")!, titleName: "Mii Maker", titleId: "0", developer: "Nintendo", version: firmwareversion)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user