From 259b5f31a7204d5bbcc3a550d6a7430391cc7500 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Tue, 25 Aug 2020 00:35:40 -0400 Subject: [PATCH] enable/disable media based on slots. --- MA2ME/AppDelegate.m | 3 + MA2ME/Base.lproj/MainMenu.xib | 5 +- MA2ME/MA2ME/Base.lproj/MediaView.xib | 22 +++---- MA2ME/MediaViewController.h | 4 +- MA2ME/MediaViewController.m | 98 +++++++++++++++++----------- SlotViewController.h | 1 + SlotViewController.m | 86 +++++++++++++++++++++++- 7 files changed, 161 insertions(+), 58 deletions(-) diff --git a/MA2ME/AppDelegate.m b/MA2ME/AppDelegate.m index 4f0c4db..378f6d3 100644 --- a/MA2ME/AppDelegate.m +++ b/MA2ME/AppDelegate.m @@ -91,6 +91,9 @@ static NSString *kMyContext = @"kMyContext"; [self addObserver: self forKeyPath: @"mameNoThrottle" options:0 context: (__bridge void * _Nullable)(kMyContext)]; [_slotController addObserver: self forKeyPath: @"args" options: 0 context: (__bridge void * _Nullable)(kMyContext)]; + + [_mediaController bind: @"media" toObject: _slotController withKeyPath: @"media" options: 0]; + [self buildCommandLine]; } diff --git a/MA2ME/Base.lproj/MainMenu.xib b/MA2ME/Base.lproj/MainMenu.xib index 273494c..1afc79d 100644 --- a/MA2ME/Base.lproj/MainMenu.xib +++ b/MA2ME/Base.lproj/MainMenu.xib @@ -736,7 +736,7 @@ - - - - - - + @@ -122,7 +117,7 @@