mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-10 05:28:56 +02:00
23 lines
675 B
Swift
23 lines
675 B
Swift
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
// SPDX-FileCopyrightText: Copyright 2024 Pomelo, Stossy11
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
import UIKit
|
|
import SwiftUI
|
|
import AppUI
|
|
|
|
class Haptics {
|
|
static let shared = Haptics()
|
|
|
|
private init() { }
|
|
|
|
func play(_ feedbackStyle: UIImpactFeedbackGenerator.FeedbackStyle) {
|
|
print("haptics")
|
|
UIImpactFeedbackGenerator(style: feedbackStyle).impactOccurred()
|
|
}
|
|
|
|
func notify(_ feedbackType: UINotificationFeedbackGenerator.FeedbackType) {
|
|
UINotificationFeedbackGenerator().notificationOccurred(feedbackType)
|
|
}
|
|
}
|