diff --git a/xcode/MAME4iOS/ChooseGameController.m b/xcode/MAME4iOS/ChooseGameController.m index 96ae8002..df671ee7 100644 --- a/xcode/MAME4iOS/ChooseGameController.m +++ b/xcode/MAME4iOS/ChooseGameController.m @@ -2177,6 +2177,7 @@ - (NSArray*)menuActionsForItemAtIndexPath:(NSIndexPath *)indexPath { ]]; // Paste image +#if !TARGET_OS_TV if (!game.gameIsFake && UIPasteboard.generalPasteboard.hasImages) { actions = [actions arrayByAddingObjectsFromArray:@[ [UIAlertAction actionWithTitle:@"Paste Image" symbol:@"photo" style:UIAlertActionStyleDefault handler:^(id action) { @@ -2193,6 +2194,7 @@ - (NSArray*)menuActionsForItemAtIndexPath:(NSIndexPath *)indexPath { }] ]]; } +#endif CommandLineArgsHelper *cmdLineArgsHelper = [[CommandLineArgsHelper alloc] initWithGameInfo:game]; NSString *cmdLineActionTitle = [cmdLineArgsHelper commandLineArgs] != nil ? @"Edit Arguments..." : @"Add Arguments..."; diff --git a/xcode/MAME4iOS/CommandLineArgsHelper.swift b/xcode/MAME4iOS/CommandLineArgsHelper.swift index 6314956b..45dddfc0 100644 --- a/xcode/MAME4iOS/CommandLineArgsHelper.swift +++ b/xcode/MAME4iOS/CommandLineArgsHelper.swift @@ -6,6 +6,8 @@ // Copyright © 2022 MAME4iOS Team. All rights reserved. // +import Darwin + extension NSDictionary { var gameInfoCommandLineArgsTitle: String { "\(gameName)-\(gameDriver)" @@ -58,7 +60,11 @@ class CommandLineArgsViewController: UIViewController { textView.layer.borderWidth = 1.0 textView.layer.borderColor = UIColor.label.cgColor textView.layer.cornerRadius = 12.0 + #if os(tvOS) + textView.font = UIFont(name: "Courier-Bold", size: 18) + #else textView.font = UIFont(name: "Courier-Bold", size: UIFont.systemFontSize) + #endif textView.textColor = .label textView.textContainerInset = UIEdgeInsets(top: 16, left: 8, bottom: 16, right: 8) textView.autocorrectionType = .no @@ -92,7 +98,11 @@ class CommandLineArgsViewController: UIViewController { } private func setupViews() { + #if os(tvOS) + view.backgroundColor = .black + #else view.backgroundColor = .systemBackground + #endif view.addSubview(helpLabel) helpLabel.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 20).isActive = true helpLabel.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor, constant: 16).isActive = true diff --git a/xcode/MAME4iOS/MAME4iOS.xcodeproj/project.pbxproj b/xcode/MAME4iOS/MAME4iOS.xcodeproj/project.pbxproj index 367e2bd5..3befaa19 100644 --- a/xcode/MAME4iOS/MAME4iOS.xcodeproj/project.pbxproj +++ b/xcode/MAME4iOS/MAME4iOS.xcodeproj/project.pbxproj @@ -31,6 +31,7 @@ 926C770A21F271A700103EDE /* ListOptionController.m in Sources */ = {isa = PBXBuildFile; fileRef = CE90575B166A89D000653872 /* ListOptionController.m */; }; 926C771D21F5034100103EDE /* TVInputOptionsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 926C771C21F5034100103EDE /* TVInputOptionsController.m */; }; 928F7B2D27D5F18E00377C40 /* CommandLineArgsHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 928F7B2C27D5F18E00377C40 /* CommandLineArgsHelper.swift */; }; + 928F7B2E27F0223100377C40 /* CommandLineArgsHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 928F7B2C27D5F18E00377C40 /* CommandLineArgsHelper.swift */; }; 92A5332321EB57F00089FBB9 /* Options.m in Sources */ = {isa = PBXBuildFile; fileRef = 92A5332121EB57F00089FBB9 /* Options.m */; }; 92A5332421EB57F00089FBB9 /* Options.m in Sources */ = {isa = PBXBuildFile; fileRef = 92A5332121EB57F00089FBB9 /* Options.m */; }; 92A5332521EBC7F40089FBB9 /* KeyboardView.m in Sources */ = {isa = PBXBuildFile; fileRef = CE8D87DC1653121200685BC4 /* KeyboardView.m */; }; @@ -1263,6 +1264,7 @@ 92A533C121EBDBAD0089FBB9 /* GCDWebServerURLEncodedFormRequest.m in Sources */, 92ECB91921EAD57900D1E3D0 /* UIView+Toast.m in Sources */, EF19F22D235D1BDF00C8EE7F /* ChooseGameController.m in Sources */, + 928F7B2E27F0223100377C40 /* CommandLineArgsHelper.swift in Sources */, EF8EAA89244F7F5D00DA02BB /* SteamController.m in Sources */, 92A533A621EBDBAD0089FBB9 /* GCDWebServerResponse.m in Sources */, 92A533D921EE601D0089FBB9 /* WebServer.m in Sources */,