Cocoa Port:
- Expose stylus pressure and stylus jitter settings in Emulation > Show Stylus Settings.
This commit is contained in:
parent
d9bb1f30e2
commit
a30ca9e350
|
@ -64,6 +64,10 @@
|
|||
<integer>12</integer>
|
||||
<key>Emulation_RigorousTiming</key>
|
||||
<false/>
|
||||
<key>Emulation_StylusPressure</key>
|
||||
<integer>50</integer>
|
||||
<key>Emulation_StylusEnableJitter</key>
|
||||
<false/>
|
||||
<key>Emulation_UseDebugConsole</key>
|
||||
<false/>
|
||||
<key>Emulation_UseExternalBIOSImages</key>
|
||||
|
|
|
@ -91,21 +91,26 @@ typedef struct
|
|||
@interface CocoaDSController : NSObject
|
||||
{
|
||||
id <CocoaDSControllerDelegate> delegate;
|
||||
float micLevel;
|
||||
|
||||
NDSInput ndsInput[DSControllerState_StatesCount];
|
||||
BOOL autohold;
|
||||
BOOL hardwareMicMute;
|
||||
BOOL _isAutoholdCleared;
|
||||
|
||||
NSPoint touchLocation;
|
||||
NSInteger paddleAdjust;
|
||||
NSInteger stylusPressure;
|
||||
BOOL stylusEnableJitter;
|
||||
|
||||
float micLevel;
|
||||
BOOL hardwareMicMute;
|
||||
BOOL _useHardwareMic;
|
||||
size_t _availableMicSamples;
|
||||
std::vector<uint8_t> *_hwMicLevelList;
|
||||
NSInteger micMode;
|
||||
NSPoint touchLocation;
|
||||
|
||||
NDSInput ndsInput[DSControllerState_StatesCount];
|
||||
AudioSampleBlockGenerator *selectedAudioFileGenerator;
|
||||
CoreAudioInput *CAInputDevice;
|
||||
AudioGenerator *softwareMicSampleGenerator;
|
||||
NSInteger paddleAdjust;
|
||||
|
||||
NSString *hardwareMicInfoString;
|
||||
NSString *hardwareMicNameString;
|
||||
|
@ -117,6 +122,9 @@ typedef struct
|
|||
|
||||
@property (retain) id <CocoaDSControllerDelegate> delegate;
|
||||
@property (assign) BOOL autohold;
|
||||
@property (assign) NSInteger paddleAdjust;
|
||||
@property (assign) NSInteger stylusPressure;
|
||||
@property (assign) BOOL stylusEnableJitter;
|
||||
@property (readonly) BOOL isHardwareMicAvailable;
|
||||
@property (readonly) BOOL isHardwareMicIdle;
|
||||
@property (readonly) BOOL isHardwareMicInClip;
|
||||
|
@ -132,7 +140,6 @@ typedef struct
|
|||
@property (readonly) CoreAudioInput *CAInputDevice;
|
||||
@property (readonly) AudioGenerator *softwareMicSampleGenerator;
|
||||
@property (assign) AudioSampleBlockGenerator *selectedAudioFileGenerator;
|
||||
@property (assign) NSInteger paddleAdjust;
|
||||
@property (retain) NSString *hardwareMicInfoString;
|
||||
@property (retain) NSString *hardwareMicNameString;
|
||||
@property (retain) NSString *hardwareMicManufacturerString;
|
||||
|
|
|
@ -35,6 +35,10 @@ SineWaveGenerator sineWaveGenerator(250.0, MIC_SAMPLE_RATE);
|
|||
@implementation CocoaDSController
|
||||
|
||||
@synthesize delegate;
|
||||
@dynamic autohold;
|
||||
@synthesize paddleAdjust;
|
||||
@synthesize stylusPressure;
|
||||
@synthesize stylusEnableJitter;
|
||||
@dynamic isHardwareMicAvailable;
|
||||
@dynamic isHardwareMicIdle;
|
||||
@dynamic isHardwareMicInClip;
|
||||
|
@ -46,12 +50,10 @@ SineWaveGenerator sineWaveGenerator(250.0, MIC_SAMPLE_RATE);
|
|||
@dynamic hardwareMicPause;
|
||||
@dynamic softwareMicState;
|
||||
@dynamic softwareMicMode;
|
||||
@dynamic autohold;
|
||||
@synthesize micMode;
|
||||
@synthesize CAInputDevice;
|
||||
@synthesize softwareMicSampleGenerator;
|
||||
@synthesize selectedAudioFileGenerator;
|
||||
@synthesize paddleAdjust;
|
||||
@synthesize hardwareMicInfoString;
|
||||
@synthesize hardwareMicNameString;
|
||||
@synthesize hardwareMicManufacturerString;
|
||||
|
@ -343,6 +345,9 @@ SineWaveGenerator sineWaveGenerator(250.0, MIC_SAMPLE_RATE);
|
|||
flushedStates[DSControllerState_Lid]);
|
||||
|
||||
// Setup the DS touch pad.
|
||||
CommonSettings.StylusPressure = (int)[self stylusPressure];
|
||||
CommonSettings.StylusJitter = ([self stylusEnableJitter]) ? true : false;
|
||||
|
||||
if (isTouchDown)
|
||||
{
|
||||
NDS_setTouchPos((u16)theLocation.x, (u16)theLocation.y);
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -231,6 +231,7 @@ class AudioSampleBlockGenerator;
|
|||
- (IBAction) writeDefaultsEmulationSettings:(id)sender;
|
||||
- (IBAction) writeDefaultsSlot1Settings:(id)sender;
|
||||
- (IBAction) writeDefaultsSoundSettings:(id)sender;
|
||||
- (IBAction) writeDefaultsStylusSettings:(id)sender;
|
||||
|
||||
- (IBAction) closeSheet:(id)sender;
|
||||
|
||||
|
|
|
@ -1002,6 +1002,15 @@
|
|||
[[NSUserDefaults standardUserDefaults] setInteger:[[speakerBindings valueForKey:@"spuSyncMethod"] integerValue] forKey:@"SPU_SyncMethod"];
|
||||
}
|
||||
|
||||
- (IBAction) writeDefaultsStylusSettings:(id)sender
|
||||
{
|
||||
CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
|
||||
CocoaDSController *cdsController = [cdsCore cdsController];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] setInteger:[cdsController stylusPressure] forKey:@"Emulation_StylusPressure"];
|
||||
[[NSUserDefaults standardUserDefaults] setBool:[cdsController stylusEnableJitter] forKey:@"Emulation_StylusEnableJitter"];
|
||||
}
|
||||
|
||||
- (IBAction) closeSheet:(id)sender
|
||||
{
|
||||
NSWindow *sheet = [(NSControl *)sender window];
|
||||
|
@ -2185,6 +2194,10 @@
|
|||
[[cdsCore cdsGPU] setRender3DLineHack:[[NSUserDefaults standardUserDefaults] boolForKey:@"Render3D_LineHack"]];
|
||||
[[cdsCore cdsGPU] setRender3DMultisample:[[NSUserDefaults standardUserDefaults] boolForKey:@"Render3D_Multisample"]];
|
||||
[[cdsCore cdsGPU] setRender3DFragmentSamplingHack:[[NSUserDefaults standardUserDefaults] boolForKey:@"Render3D_FragmentSamplingHack"]];
|
||||
|
||||
// Set the stylus options per user preferences.
|
||||
[[cdsCore cdsController] setStylusPressure:[[NSUserDefaults standardUserDefaults] integerForKey:@"Emulation_StylusPressure"]];
|
||||
[[cdsCore cdsController] setStylusEnableJitter:[[NSUserDefaults standardUserDefaults] boolForKey:@"Emulation_StylusEnableJitter"]];
|
||||
}
|
||||
|
||||
#pragma mark NSUserInterfaceValidations Protocol
|
||||
|
|
Loading…
Reference in New Issue