mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-10-21 05:50:06 +02:00
swift reworks
This commit is contained in:
parent
8b514d39fe
commit
ccbcc9958c
7 changed files with 154 additions and 303 deletions
|
|
@ -349,7 +349,7 @@ class Haptics {
|
|||
|
||||
struct ButtonView: View {
|
||||
var button: VirtualControllerButtonType
|
||||
@StateObject private var viewModel: EmulationViewModel = EmulationViewModel(game: nil)
|
||||
@StateObject private var viewModel: EmulationViewModel = EmulationViewModel()
|
||||
let appui = AppUI.shared
|
||||
@State var mtkView: MTKView?
|
||||
@State var width: CGFloat = 45
|
||||
|
|
@ -446,7 +446,7 @@ struct EmulationView: View {
|
|||
@Environment(\.scenePhase) var scenePhase
|
||||
|
||||
init(game: EmulationGame?) {
|
||||
_viewModel = StateObject(wrappedValue: EmulationViewModel(game: game))
|
||||
_viewModel = StateObject(wrappedValue: EmulationViewModel())
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
|
|
@ -555,4 +555,4 @@ struct SizePreferenceKey: PreferenceKey {
|
|||
static func reduce(value: inout CGSize, nextValue: () -> CGSize) {
|
||||
value = nextValue()
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue