Move controller to storyboard, Add file parameters
This commit is contained in:
parent
d106f541e6
commit
c4b6ee3333
|
@ -14,6 +14,7 @@
|
|||
|
||||
@interface ViewController : GLKViewController <iCadeEventDelegate>
|
||||
|
||||
@property NSString* diskImage;
|
||||
@property (nonatomic) iCadeReaderView* iCadeReader;
|
||||
@property (nonatomic) GCController *gController __attribute__((weak_import));
|
||||
@property (nonatomic, strong) id connectObserver;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
//
|
||||
|
||||
#import "EmulatorViewController.h"
|
||||
#import "EmulatorView.h"
|
||||
#import <OpenGLES/ES2/glext.h>
|
||||
|
||||
#include "types.h"
|
||||
|
@ -67,14 +68,18 @@ extern "C" int reicast_main(int argc, char* argv[]);
|
|||
-(void)emuThread
|
||||
{
|
||||
install_prof_handler(1);
|
||||
|
||||
|
||||
//This looks like the right place, rite?
|
||||
char text[2]="";
|
||||
|
||||
|
||||
char* prms[2];
|
||||
prms[0]=text;
|
||||
|
||||
|
||||
if (self.diskImage != nil) {
|
||||
NSString *file = [NSString stringWithFormat:@"config:image=%@", self.diskImage];
|
||||
strcpy(prms[1], [file UTF8String]);
|
||||
}
|
||||
|
||||
reicast_main(1, prms);
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -94,6 +94,17 @@
|
|||
return cell;
|
||||
}
|
||||
|
||||
-(void)prepareForSegue: (UIStoryboardSegue*)segue sender: (id)sender
|
||||
{
|
||||
if ([segue.identifier isEqualToString:@"emulatorView"]) {
|
||||
NSIndexPath* indexPath = self.tableView.indexPathForSelectedRow;
|
||||
NSString* filePath = [self.diskImages objectAtIndex: indexPath.row];
|
||||
NSString* diskPath = [[self documents].path stringByAppendingPathComponent: filePath];
|
||||
ViewController* emulatorView = segue.destinationViewController;
|
||||
emulatorView.diskImage = diskPath;
|
||||
}
|
||||
}
|
||||
|
||||
-(void)tableView: (UITableView*)tableView didSelectRowAtIndexPath: (NSIndexPath*)indexPath
|
||||
{
|
||||
[self performSegueWithIdentifier: @"emulatorView" sender: self];
|
||||
|
|
|
@ -1,129 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VirtualViewController">
|
||||
<connections>
|
||||
<outlet property="img_abxy_a" destination="iKO-3z-Ias" id="oRQ-Ot-o9X"/>
|
||||
<outlet property="img_abxy_b" destination="7LB-OY-vh3" id="cRb-HF-lB5"/>
|
||||
<outlet property="img_abxy_x" destination="iwO-7q-c8H" id="hva-yg-GyI"/>
|
||||
<outlet property="img_abxy_y" destination="hGZ-v7-VA5" id="s3t-TW-RMC"/>
|
||||
<outlet property="img_dpad_d" destination="s7g-nq-lRU" id="18B-Oa-iYW"/>
|
||||
<outlet property="img_dpad_l" destination="rp6-Nd-1qa" id="2bI-dY-c42"/>
|
||||
<outlet property="img_dpad_r" destination="CVH-hw-R8F" id="sZ1-PW-o0j"/>
|
||||
<outlet property="img_dpad_u" destination="WMD-Fv-ibu" id="lLl-ak-69J"/>
|
||||
<outlet property="img_lt" destination="8Gl-Iv-u8L" id="7hg-SV-U3u"/>
|
||||
<outlet property="img_rt" destination="V8J-vG-dlF" id="lCV-ed-R6J"/>
|
||||
<outlet property="img_start" destination="VtI-tC-PSX" id="mQP-ev-xQA"/>
|
||||
<outlet property="view" destination="3M7-1s-N5r" id="pbF-19-58j"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="3M7-1s-N5r">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="LTrigger.png" translatesAutoresizingMaskIntoConstraints="NO" id="H57-MD-elm">
|
||||
<rect key="frame" x="16" y="28" width="80" height="40"/>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8Gl-Iv-u8L">
|
||||
<rect key="frame" x="16" y="28" width="80" height="40"/>
|
||||
<state key="normal" title="Button">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
</button>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="RTrigger.png" translatesAutoresizingMaskIntoConstraints="NO" id="Cjn-zx-eSs">
|
||||
<rect key="frame" x="504" y="28" width="80" height="40"/>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="V8J-vG-dlF">
|
||||
<rect key="frame" x="504" y="28" width="80" height="40"/>
|
||||
<state key="normal" title="Button">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
</button>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="JoystickButton.png" translatesAutoresizingMaskIntoConstraints="NO" id="ivh-8r-bw3">
|
||||
<rect key="frame" x="36" y="466" width="100" height="100"/>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="JoystickBackground.png" translatesAutoresizingMaskIntoConstraints="NO" id="OMP-L6-n0A">
|
||||
<rect key="frame" x="22" y="452" width="128" height="128"/>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="DPad.png" translatesAutoresizingMaskIntoConstraints="NO" id="FLe-Gr-hny">
|
||||
<rect key="frame" x="16" y="304" width="140" height="140"/>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rp6-Nd-1qa">
|
||||
<rect key="frame" x="16" y="354" width="46" height="40"/>
|
||||
<state key="normal" title="Button">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CVH-hw-R8F">
|
||||
<rect key="frame" x="110" y="354" width="46" height="40"/>
|
||||
<state key="normal" title="Button">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WMD-Fv-ibu">
|
||||
<rect key="frame" x="66" y="304" width="40" height="40"/>
|
||||
<state key="normal" title="Button">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="s7g-nq-lRU">
|
||||
<rect key="frame" x="66" y="404" width="40" height="40"/>
|
||||
<state key="normal" title="Button">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
</button>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="ABXYPad.png" translatesAutoresizingMaskIntoConstraints="NO" id="xbP-E4-fCE">
|
||||
<rect key="frame" x="424" y="419" width="160" height="161"/>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iwO-7q-c8H">
|
||||
<rect key="frame" x="424" y="470" width="60" height="60"/>
|
||||
<state key="normal" title="Button">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7LB-OY-vh3">
|
||||
<rect key="frame" x="524" y="470" width="60" height="60"/>
|
||||
<state key="normal" title="Button">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hGZ-v7-VA5">
|
||||
<rect key="frame" x="474" y="419" width="60" height="60"/>
|
||||
<state key="normal" title="Button">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iKO-3z-Ias">
|
||||
<rect key="frame" x="474" y="520" width="60" height="60"/>
|
||||
<state key="normal" title="Button">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
</button>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="Start.png" translatesAutoresizingMaskIntoConstraints="NO" id="9K0-cV-7zu">
|
||||
<rect key="frame" x="260" y="552" width="80" height="40"/>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="VtI-tC-PSX">
|
||||
<rect key="frame" x="273" y="552" width="54" height="40"/>
|
||||
<state key="normal" title="Button">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="ABXYPad.png" width="120" height="120"/>
|
||||
<image name="DPad.png" width="120" height="120"/>
|
||||
<image name="JoystickBackground.png" width="120" height="120"/>
|
||||
<image name="JoystickButton.png" width="56" height="56"/>
|
||||
<image name="LTrigger.png" width="67" height="44"/>
|
||||
<image name="RTrigger.png" width="67" height="44"/>
|
||||
<image name="Start.png" width="48" height="26"/>
|
||||
</resources>
|
||||
</document>
|
|
@ -43,7 +43,6 @@
|
|||
87078AA318A47FE90034C7A0 /* Shader.fsh in Resources */ = {isa = PBXBuildFile; fileRef = 87078AA218A47FE90034C7A0 /* Shader.fsh */; };
|
||||
87078AA518A47FE90034C7A0 /* Shader.vsh in Resources */ = {isa = PBXBuildFile; fileRef = 87078AA418A47FE90034C7A0 /* Shader.vsh */; };
|
||||
872EF7021B852EB200A0F617 /* VirtualViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 872EF7001B852EB200A0F617 /* VirtualViewController.m */; };
|
||||
872EF7031B852EB200A0F617 /* VirtualViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 872EF7011B852EB200A0F617 /* VirtualViewController.xib */; };
|
||||
876AA3771B818A4000617242 /* ini.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 876AA3751B818A4000617242 /* ini.cpp */; };
|
||||
877652C21B6157BD00437F10 /* audiobackend_alsa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 877652B61B6157BD00437F10 /* audiobackend_alsa.cpp */; };
|
||||
877652C31B6157BD00437F10 /* audiobackend_directsound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 877652B91B6157BD00437F10 /* audiobackend_directsound.cpp */; };
|
||||
|
@ -307,7 +306,6 @@
|
|||
87078AB018A47FE90034C7A0 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
|
||||
872EF6FF1B852EB200A0F617 /* VirtualViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VirtualViewController.h; path = emulator/VirtualViewController.h; sourceTree = "<group>"; };
|
||||
872EF7001B852EB200A0F617 /* VirtualViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VirtualViewController.m; path = emulator/VirtualViewController.m; sourceTree = "<group>"; };
|
||||
872EF7011B852EB200A0F617 /* VirtualViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = VirtualViewController.xib; path = emulator/VirtualViewController.xib; sourceTree = "<group>"; };
|
||||
876AA3751B818A4000617242 /* ini.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ini.cpp; sourceTree = "<group>"; };
|
||||
876AA3761B818A4000617242 /* ini.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ini.h; sourceTree = "<group>"; };
|
||||
877652B61B6157BD00437F10 /* audiobackend_alsa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = audiobackend_alsa.cpp; sourceTree = "<group>"; };
|
||||
|
@ -847,7 +845,6 @@
|
|||
8794D9C21B88F3D600B1B3A3 /* DiskViewCell.m */,
|
||||
872EF6FF1B852EB200A0F617 /* VirtualViewController.h */,
|
||||
872EF7001B852EB200A0F617 /* VirtualViewController.m */,
|
||||
872EF7011B852EB200A0F617 /* VirtualViewController.xib */,
|
||||
87C208C51B7A4BFA00638BDD /* AboutViewController.h */,
|
||||
87C208C61B7A4BFA00638BDD /* AboutViewController.m */,
|
||||
87C208C71B7A4BFA00638BDD /* BrowserTableViewController.h */,
|
||||
|
@ -1557,7 +1554,6 @@
|
|||
87D92F4C1B7A1B4800D8FD9E /* Start@2x.png in Resources */,
|
||||
87D92F471B7A1B4800D8FD9E /* menuicon.png in Resources */,
|
||||
87D92F411B7A1B4800D8FD9E /* JoystickButton.png in Resources */,
|
||||
872EF7031B852EB200A0F617 /* VirtualViewController.xib in Resources */,
|
||||
87D92F441B7A1B4800D8FD9E /* LTrigger@2x.png in Resources */,
|
||||
87D92F551B7A1BB100D8FD9E /* LICENSE in Resources */,
|
||||
87D92F451B7A1B4800D8FD9E /* menuback.png in Resources */,
|
||||
|
|
Loading…
Reference in New Issue