1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-25 03:32:01 +00:00

Merge pull request #654 from TomHarte/GoodbyeFastTapeProtocol

Eliminates fast loading Objective-C/Swift protocol.
This commit is contained in:
Thomas Harte 2019-09-24 20:22:08 -04:00 committed by GitHub
commit 298694a881
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 24 deletions

View File

@ -1434,7 +1434,6 @@
4BBB70A3202011C2002FE009 /* MultiMediaTarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MultiMediaTarget.cpp; sourceTree = "<group>"; };
4BBB70A6202014E2002FE009 /* MultiCRTMachine.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MultiCRTMachine.cpp; sourceTree = "<group>"; };
4BBB70A7202014E2002FE009 /* MultiCRTMachine.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = MultiCRTMachine.hpp; sourceTree = "<group>"; };
4BBC34241D2208B100FFC9DF /* CSFastLoading.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSFastLoading.h; sourceTree = "<group>"; };
4BBC951C1F368D83008F4C34 /* i8272.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = i8272.cpp; path = 8272/i8272.cpp; sourceTree = "<group>"; };
4BBC951D1F368D83008F4C34 /* i8272.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = i8272.hpp; path = 8272/i8272.hpp; sourceTree = "<group>"; };
4BBF49AE1ED2880200AB3669 /* FUSETests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FUSETests.swift; sourceTree = "<group>"; };
@ -1774,7 +1773,6 @@
4B2A53921D117D36003C6002 /* Machine */ = {
isa = PBXGroup;
children = (
4BBC34241D2208B100FFC9DF /* CSFastLoading.h */,
4B2A53951D117D36003C6002 /* CSMachine.h */,
4B643F3C1D77AE5C00D431D6 /* CSMachine+Target.h */,
4B2A53971D117D36003C6002 /* KeyCodes.h */,

View File

@ -3,7 +3,6 @@
//
#import "CSMachine.h"
#import "CSFastLoading.h"
#import "CSAtari2600.h"
#import "CSZX8081.h"

View File

@ -22,11 +22,9 @@ class MachinePanel: NSPanel {
}
@IBOutlet var fastLoadingButton: NSButton?
@IBAction func setFastLoading(_ sender: NSButton!) {
if let fastLoadingMachine = machine as? CSFastLoading {
let useFastLoadingHack = sender.state == .on
fastLoadingMachine.useFastLoadingHack = useFastLoadingHack
UserDefaults.standard.set(useFastLoadingHack, forKey: fastLoadingUserDefaultsKey)
}
let useFastLoadingHack = sender.state == .on
machine.useFastLoadingHack = useFastLoadingHack
UserDefaults.standard.set(useFastLoadingHack, forKey: fastLoadingUserDefaultsKey)
}
// MARK: Quick Boot
@ -71,10 +69,10 @@ class MachinePanel: NSPanel {
displayTypeUserDefaultsKey: 0
])
if let fastLoadingMachine = machine as? CSFastLoading {
if let fastLoadingButton = self.fastLoadingButton {
let useFastLoadingHack = standardUserDefaults.bool(forKey: self.fastLoadingUserDefaultsKey)
fastLoadingMachine.useFastLoadingHack = useFastLoadingHack
self.fastLoadingButton?.state = useFastLoadingHack ? .on : .off
machine.useFastLoadingHack = useFastLoadingHack
fastLoadingButton.state = useFastLoadingHack ? .on : .off
}
if let fastBootingButton = self.fastBootingButton {

View File

@ -1,11 +0,0 @@
//
// CSFastLoading.h
// Clock Signal
//
// Created by Thomas Harte on 05/06/2016.
// Copyright 2016 Thomas Harte. All rights reserved.
//
@protocol CSFastLoading <NSObject>
@property (nonatomic, assign) BOOL useFastLoadingHack;
@end

View File

@ -9,7 +9,6 @@
#import <Foundation/Foundation.h>
#import "CSAudioQueue.h"
#import "CSFastLoading.h"
#import "CSOpenGLView.h"
#import "CSStaticAnalyser.h"
#import "CSJoystickManager.h"

View File

@ -32,7 +32,7 @@
#include "../../../../Outputs/OpenGL/ScanTarget.hpp"
#include "../../../../Outputs/OpenGL/Screenshot.hpp"
@interface CSMachine() <CSFastLoading>
@interface CSMachine()
- (void)speaker:(Outputs::Speaker::Speaker *)speaker didCompleteSamples:(const int16_t *)samples length:(int)length;
- (void)speakerDidChangeInputClock:(Outputs::Speaker::Speaker *)speaker;
- (void)addLED:(NSString *)led;