2019-11-07 04:44:19 +00:00
|
|
|
/*****************************************************************************\
|
2021-04-26 00:44:40 +00:00
|
|
|
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
|
|
|
This file is licensed under the Snes9x License.
|
2019-11-07 04:44:19 +00:00
|
|
|
For further information, consult the LICENSE file in the root directory.
|
|
|
|
\*****************************************************************************/
|
|
|
|
|
|
|
|
/***********************************************************************************
|
|
|
|
SNES9X for Mac OS (c) Copyright John Stiles
|
|
|
|
|
|
|
|
Snes9x for Mac OS X
|
|
|
|
|
|
|
|
(c) Copyright 2001 - 2011 zones
|
|
|
|
(c) Copyright 2002 - 2005 107
|
|
|
|
(c) Copyright 2002 PB1400c
|
|
|
|
(c) Copyright 2004 Alexander and Sander
|
|
|
|
(c) Copyright 2004 - 2005 Steven Seeger
|
|
|
|
(c) Copyright 2005 Ryan Vogt
|
2022-02-06 23:03:46 +00:00
|
|
|
(c) Copyright 2019 - 2022 Michael Donald Buckley
|
2019-11-07 04:44:19 +00:00
|
|
|
***********************************************************************************/
|
2019-09-02 17:20:32 +00:00
|
|
|
|
|
|
|
#import <Cocoa/Cocoa.h>
|
2019-11-11 04:31:49 +00:00
|
|
|
#import <snes9x_framework/snes9x_framework.h>
|
2020-09-14 21:31:56 +00:00
|
|
|
#import "S9xPreferences/S9xPreferencesWindowController.h"
|
2022-02-06 23:03:46 +00:00
|
|
|
#import "Cheats/S9xCheatsViewController.h"
|
2020-09-14 21:31:56 +00:00
|
|
|
|
2020-09-22 16:17:14 +00:00
|
|
|
extern NSWindowFrameAutosaveName const kMainWindowIdentifier;
|
2019-09-02 17:20:32 +00:00
|
|
|
|
2019-11-10 21:02:21 +00:00
|
|
|
@interface AppDelegate : NSObject <NSApplicationDelegate, S9xInputDelegate>
|
2019-09-02 17:20:32 +00:00
|
|
|
|
2019-11-11 04:31:49 +00:00
|
|
|
@property (nonatomic, readonly, assign) BOOL isRunningEmulation;
|
2020-09-14 21:31:56 +00:00
|
|
|
@property (nonatomic, strong) S9xEngine *s9xEngine;
|
|
|
|
@property (nonatomic, strong) NSMutableDictionary<NSString *, NSNumber *> *keys;
|
|
|
|
@property (nonatomic, strong) NSWindow *gameWindow;
|
|
|
|
@property (nonatomic, strong) S9xPreferencesWindowController *preferencesWindowController;
|
2022-02-06 23:03:46 +00:00
|
|
|
@property (nonatomic, strong) NSWindowController *cheatsWindowController;
|
2023-03-25 14:36:29 +00:00
|
|
|
@property (nonatomic, strong) NSWindowController *cheatFinderWindowController;
|
2020-12-29 05:13:01 +00:00
|
|
|
@property (nonatomic, readonly, assign) S9xDeviceSetting deviceSetting;
|
2019-11-11 04:31:49 +00:00
|
|
|
|
2019-11-07 04:44:19 +00:00
|
|
|
- (void)setButtonCode:(S9xButtonCode)buttonCode forKeyCode:(int16)keyCode player:(int8)player;
|
2019-11-10 21:02:21 +00:00
|
|
|
- (void)clearButton:(S9xButtonCode)button forPlayer:(int8)player;
|
|
|
|
|
|
|
|
- (NSArray<S9xJoypad *> *)listJoypads;
|
|
|
|
- (void)setPlayer:(int8)player forVendorID:(uint32)vendorID productID:(uint32)productID index:(uint32)index;
|
|
|
|
- (BOOL)setButton:(S9xButtonCode)button forVendorID:(uint32)vendorID productID:(uint32)productID index:(uint32)index cookie:(uint32)cookie value:(int32)value;
|
|
|
|
- (void)clearJoypadForVendorID:(uint32)vendorID productID:(uint32)productID index:(uint32)index buttonCode:(S9xButtonCode)buttonCode;
|
|
|
|
- (NSString *)labelForVendorID:(uint32)vendorID productID:(uint32)productID cookie:(uint32)cookie value:(int32)value;
|
|
|
|
|
|
|
|
- (NSString *)prefsKeyForVendorID:(uint32)vendorID productID:(uint32)productID index:(uint32)index;
|
|
|
|
- (BOOL)getValuesFromString:(NSString *)str vendorID:(uint32 *)vendorID productID:(uint32 *)productID index:(uint32 *)index;
|
|
|
|
|
|
|
|
- (NSString *)prefValueForCookie:(uint32)cookie value:(int32)value;
|
|
|
|
- (BOOL)getValuesFromString:(NSString *)str cookie:(uint32 *)cookie value:(int32 *)value;
|
|
|
|
|
|
|
|
- (void)setVideoMode:(int)videoMode;
|
2020-09-13 02:02:42 +00:00
|
|
|
- (void)setMacFrameSkip:(int)_macFrameSkip;
|
2019-11-10 21:02:21 +00:00
|
|
|
- (void)setShowFPS:(BOOL)showFPS;
|
2019-09-02 17:20:32 +00:00
|
|
|
|
2021-11-15 18:57:25 +00:00
|
|
|
- (void)applyEmulationSettings;
|
|
|
|
|
2019-09-02 17:20:32 +00:00
|
|
|
@end
|
|
|
|
|