Migrate to Swift 4.0 with @objc inferencing fixes for Moonlight build target

This commit is contained in:
Cameron Gutman
2018-02-19 14:43:50 -08:00
parent 3fee5d0a62
commit 127e5ed54a
2 changed files with 19 additions and 15 deletions
+9 -9
View File
@@ -14,13 +14,13 @@ import Foundation
*/
class Controller: NSObject {
// Swift requires initial properties
var playerIndex: CInt = 0 // Controller number (e.g. 1, 2 ,3 etc)
var lastButtonFlags: CInt = 0
var emulatingButtonFlags: CInt = 0
var lastLeftTrigger: CChar = 0 // Last left trigger pressed
var lastRightTrigger: CChar = 0 // Last right trigger pressed
var lastLeftStickX: CShort = 0 // Last X direction the left joystick went
var lastLeftStickY: CShort = 0 // Last Y direction the left joystick went
var lastRightStickX: CShort = 0 // Last X direction the right joystick went
var lastRightStickY: CShort = 0 // Last Y direction the right joystick went
@objc var playerIndex: CInt = 0 // Controller number (e.g. 1, 2 ,3 etc)
@objc var lastButtonFlags: CInt = 0
@objc var emulatingButtonFlags: CInt = 0
@objc var lastLeftTrigger: CChar = 0 // Last left trigger pressed
@objc var lastRightTrigger: CChar = 0 // Last right trigger pressed
@objc var lastLeftStickX: CShort = 0 // Last X direction the left joystick went
@objc var lastLeftStickY: CShort = 0 // Last Y direction the left joystick went
@objc var lastRightStickX: CShort = 0 // Last X direction the right joystick went
@objc var lastRightStickY: CShort = 0 // Last Y direction the right joystick went
}