mirror of
https://github.com/zydeco/minivmac4ios.git
synced 2024-06-29 02:29:37 +00:00
add Interrupt and Reset buttons
This commit is contained in:
parent
a4d235426b
commit
e8daea9f56
|
@ -33,5 +33,8 @@ extern NSString * const MNVMDidEjectDiskNotification;
|
||||||
- (BOOL)insertDisk:(NSString*)path;
|
- (BOOL)insertDisk:(NSString*)path;
|
||||||
- (BOOL)isDiskInserted:(NSString*)path;
|
- (BOOL)isDiskInserted:(NSString*)path;
|
||||||
|
|
||||||
|
- (void)macInterrupt;
|
||||||
|
- (void)macReset;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,8 @@ IMPORTFUNC blnr Sony_Insert1(NSString *filePath, blnr silentfail);
|
||||||
IMPORTFUNC blnr Sony_IsInserted(NSString *filePath);
|
IMPORTFUNC blnr Sony_IsInserted(NSString *filePath);
|
||||||
EXPORTVAR(ui3b,SpeedValue);
|
EXPORTVAR(ui3b,SpeedValue);
|
||||||
IMPORTPROC SetKeyState(int key, blnr down);
|
IMPORTPROC SetKeyState(int key, blnr down);
|
||||||
|
IMPORTPROC MacInterrupt();
|
||||||
|
IMPORTPROC MacReset();
|
||||||
|
|
||||||
static AppDelegate *sharedAppDelegate = nil;
|
static AppDelegate *sharedAppDelegate = nil;
|
||||||
NSString * const MNVMDidInsertDiskNotification = @"MNVMDidInsertDisk";
|
NSString * const MNVMDidInsertDiskNotification = @"MNVMDidInsertDisk";
|
||||||
|
@ -266,6 +268,14 @@ NSString * const MNVMDidEjectDiskNotification = @"MNVMDidEjectDisk";
|
||||||
SetMouseButton(down);
|
SetMouseButton(down);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)macInterrupt {
|
||||||
|
MacInterrupt();
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)macReset {
|
||||||
|
MacReset();
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - Keyboard
|
#pragma mark - Keyboard
|
||||||
|
|
||||||
- (int)translateScanCode:(int)scancode {
|
- (int)translateScanCode:(int)scancode {
|
||||||
|
|
23
Mini vMac/Assets.xcassets/Interrupt.imageset/Contents.json
vendored
Normal file
23
Mini vMac/Assets.xcassets/Interrupt.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "interrupt.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "interrupt@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "interrupt@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
BIN
Mini vMac/Assets.xcassets/Interrupt.imageset/interrupt.png
vendored
Normal file
BIN
Mini vMac/Assets.xcassets/Interrupt.imageset/interrupt.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
Mini vMac/Assets.xcassets/Interrupt.imageset/interrupt@2x.png
vendored
Normal file
BIN
Mini vMac/Assets.xcassets/Interrupt.imageset/interrupt@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
BIN
Mini vMac/Assets.xcassets/Interrupt.imageset/interrupt@3x.png
vendored
Normal file
BIN
Mini vMac/Assets.xcassets/Interrupt.imageset/interrupt@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
23
Mini vMac/Assets.xcassets/Reset.imageset/Contents.json
vendored
Normal file
23
Mini vMac/Assets.xcassets/Reset.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "reset.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "reset@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "reset@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
BIN
Mini vMac/Assets.xcassets/Reset.imageset/reset.png
vendored
Normal file
BIN
Mini vMac/Assets.xcassets/Reset.imageset/reset.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
Mini vMac/Assets.xcassets/Reset.imageset/reset@2x.png
vendored
Normal file
BIN
Mini vMac/Assets.xcassets/Reset.imageset/reset@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
BIN
Mini vMac/Assets.xcassets/Reset.imageset/reset@3x.png
vendored
Normal file
BIN
Mini vMac/Assets.xcassets/Reset.imageset/reset@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
|
@ -230,6 +230,18 @@
|
||||||
<action selector="showSettings:" destination="mbX-kA-h6M" id="dIs-rf-PeS"/>
|
<action selector="showSettings:" destination="mbX-kA-h6M" id="dIs-rf-PeS"/>
|
||||||
</connections>
|
</connections>
|
||||||
</barButtonItem>
|
</barButtonItem>
|
||||||
|
<barButtonItem style="plain" systemItem="flexibleSpace" id="klq-lo-Wrl"/>
|
||||||
|
<barButtonItem image="Interrupt" id="YFW-lp-dCD">
|
||||||
|
<connections>
|
||||||
|
<action selector="macInterrupt:" destination="mbX-kA-h6M" id="zmC-N7-nZp"/>
|
||||||
|
</connections>
|
||||||
|
</barButtonItem>
|
||||||
|
<barButtonItem width="42" style="plain" systemItem="fixedSpace" id="bwn-1m-FZJ"/>
|
||||||
|
<barButtonItem image="Reset" id="l5C-8z-pWj">
|
||||||
|
<connections>
|
||||||
|
<action selector="macReset:" destination="mbX-kA-h6M" id="n8H-fa-LkM"/>
|
||||||
|
</connections>
|
||||||
|
</barButtonItem>
|
||||||
</toolbarItems>
|
</toolbarItems>
|
||||||
<navigationItem key="navigationItem" title="Insert Disk" id="hjJ-Yt-wg8">
|
<navigationItem key="navigationItem" title="Insert Disk" id="hjJ-Yt-wg8">
|
||||||
<barButtonItem key="backBarButtonItem" title="Disk" id="pie-Ez-AWv"/>
|
<barButtonItem key="backBarButtonItem" title="Disk" id="pie-Ez-AWv"/>
|
||||||
|
@ -267,6 +279,8 @@
|
||||||
</scene>
|
</scene>
|
||||||
</scenes>
|
</scenes>
|
||||||
<resources>
|
<resources>
|
||||||
|
<image name="Interrupt" width="30" height="30"/>
|
||||||
|
<image name="Reset" width="30" height="30"/>
|
||||||
<image name="Settings" width="30" height="30"/>
|
<image name="Settings" width="30" height="30"/>
|
||||||
<image name="floppy30" width="30" height="30"/>
|
<image name="floppy30" width="30" height="30"/>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -12,5 +12,7 @@
|
||||||
|
|
||||||
- (IBAction)showSettings:(id)sender;
|
- (IBAction)showSettings:(id)sender;
|
||||||
- (IBAction)dismiss:(id)sender;
|
- (IBAction)dismiss:(id)sender;
|
||||||
|
- (IBAction)macInterrupt:(id)sender;
|
||||||
|
- (IBAction)macReset:(id)sender;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -77,6 +77,8 @@
|
||||||
[self.tableView reloadData];
|
[self.tableView reloadData];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma mark - Button Actions
|
||||||
|
|
||||||
- (void)showSettings:(id)sender {
|
- (void)showSettings:(id)sender {
|
||||||
[[AppDelegate sharedInstance] showSettings:sender];
|
[[AppDelegate sharedInstance] showSettings:sender];
|
||||||
}
|
}
|
||||||
|
@ -85,6 +87,15 @@
|
||||||
[self dismissViewControllerAnimated:YES completion:nil];
|
[self dismissViewControllerAnimated:YES completion:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)macInterrupt:(id)sender {
|
||||||
|
[self dismiss:sender];
|
||||||
|
[[AppDelegate sharedInstance] macInterrupt];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)macReset:(id)sender {
|
||||||
|
[[AppDelegate sharedInstance] macReset];
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - Table view data source
|
#pragma mark - Table view data source
|
||||||
|
|
||||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||||
|
|
|
@ -1687,3 +1687,11 @@ GLOBALPROC RunEmulator(void) {
|
||||||
}
|
}
|
||||||
UnInitOSGLU();
|
UnInitOSGLU();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GLOBALPROC MacInterrupt(void) {
|
||||||
|
WantMacInterrupt = trueblnr;
|
||||||
|
}
|
||||||
|
|
||||||
|
GLOBALPROC MacReset(void) {
|
||||||
|
WantMacReset = trueblnr;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user