Skip to content

Commit

Permalink
registry: remove old hasSaveState property
Browse files Browse the repository at this point in the history
  • Loading branch information
osy committed Aug 22, 2023
1 parent c5b188f commit 5967988
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Platform/VMData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ extension VMData {
var stateLabel: String {
switch state {
case .stopped:
if registryEntry?.hasSaveState == true {
if registryEntry?.isSuspended == true {
return NSLocalizedString("Suspended", comment: "VMData");
} else {
return NSLocalizedString("Stopped", comment: "VMData");
Expand Down
2 changes: 1 addition & 1 deletion Platform/iOS/UTMDataExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extension UTMData {
guard let wrapped = vm.wrapped else {
return
}
if wrapped.registryEntry.hasSaveState {
if wrapped.registryEntry.isSuspended {
wrapped.requestVmDeleteState()
}
}
Expand Down
2 changes: 1 addition & 1 deletion Platform/macOS/Display/VMDisplayWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ extension VMDisplayWindowController: NSWindowDelegate {
guard !isSecondary else {
return true
}
guard !(vm.state == .stopped || (vm.state == .paused && vm.registryEntry.hasSaveState)) else {
guard !(vm.state == .stopped || (vm.state == .paused && vm.registryEntry.isSuspended)) else {
return true
}
guard !isNoQuitConfirmation else {
Expand Down
14 changes: 0 additions & 14 deletions Services/UTMRegistryEntry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -354,20 +354,6 @@ extension UTMRegistryEntry {
#endif
}

// MARK: - Objective C bridging
// FIXME: these are NOT synchronized to the actor
@objc extension UTMRegistryEntry {
var hasSaveState: Bool {
get {
_isSuspended
}

set {
_isSuspended = newValue
}
}
}

extension UTMRegistryEntry {
struct File: Codable, Identifiable {
var url: URL
Expand Down

0 comments on commit 5967988

Please sign in to comment.