Skip to content

Commit

Permalink
filter out app store disabled cores
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
  • Loading branch information
JoeMatt committed Dec 3, 2024
1 parent 4515934 commit f1e5760
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
5 changes: 4 additions & 1 deletion PVUI/Sources/PVSwiftUI/Components/GameContextMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,17 @@ import PVUIBase
struct GameContextMenu: SwiftUI.View {

var game: PVGame
var cores: [PVCore] {
game.system.cores.filter{!(AppState.shared.isAppStore && $0.appStoreDisabled)}
}

weak var rootDelegate: PVRootDelegate?
var contextMenuDelegate: GameContextMenuDelegate?

var body: some SwiftUI.View {
Group {
if !game.isInvalidated {
if game.system.cores.count > 1 {
if cores.count > 1 {
Button {
Task { @MainActor in
await rootDelegate?.root_presentCoreSelection(forGame: game, sender: self)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ struct SystemSection: View {

// Cores
SettingsRow(title: "Cores",
value: system.cores.map { $0.projectName }.joined(separator: ", "))
value: system.cores
.filter{ core in
!(AppState.shared.isAppStore && core.appStoreDisabled)
}
.map { $0.projectName }
.joined(separator: ", "))

// BIOSes
if let bioses = system.BIOSes, !bioses.isEmpty {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ extension GameLaunchingViewController where Self: UIViewController {


let cores: [PVCore] = system.cores.filter {
(!$0.disabled || unsupportedCores) && $0.hasCoreClass
(!$0.disabled || unsupportedCores) && $0.hasCoreClass && !(AppState.shared.isAppStore && $0.appStoreDisabled)
}.sorted(by: { $0.projectName < $1.projectName })

guard !cores.isEmpty else {
Expand Down
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ _My personal TODO notes_

- [X] Hud still looping
- [X] save state manager is showing saves for all roms
- [ ] App store blocked cores still showing up
- [X] App store blocked cores still showing up
- [ ] Mupen retroarch no video
- [ ] ugly retroarch ui in app, a bit unresponsive
- [ ] Pokemini audio fucked up
Expand Down

0 comments on commit f1e5760

Please sign in to comment.