mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
iOS ViewController: Move external methods to a protocol
This commit is contained in:
1 parent
076194eb6f
commit
3166eee3f0
2 files changed
+15
-9
No files matched your search
+12
-7
@@ -9,17 +9,22 @@
|
||||
#import "CameraHelper.h"
|
||||
#import "LocationHelper.h"
|
||||
|
||||
@interface ViewController : GLKViewController <iCadeEventDelegate,
|
||||
LocationHandlerDelegate, CameraFrameDelegate, UIGestureRecognizerDelegate, UIKeyInput>
|
||||
|
||||
- (void)shareText:(NSString *)text;
|
||||
- (void)shutdown;
|
||||
@protocol PPSSPPViewController<NSObject>
|
||||
@optional
|
||||
- (void)hideKeyboard;
|
||||
- (void)showKeyboard;
|
||||
|
||||
- (void)shareText:(NSString *)text;
|
||||
- (void)shutdown;
|
||||
- (void)bindDefaultFBO;
|
||||
@end
|
||||
|
||||
extern __unsafe_unretained ViewController* sharedViewController;
|
||||
@interface ViewController : GLKViewController <
|
||||
iCadeEventDelegate, LocationHandlerDelegate, CameraFrameDelegate,
|
||||
UIGestureRecognizerDelegate, UIKeyInput, PPSSPPViewController>
|
||||
@end
|
||||
|
||||
extern id <PPSSPPViewController> sharedViewController;
|
||||
|
||||
void setCameraSize(int width, int height);
|
||||
void startVideo();
|
||||
void stopVideo();
|
||||
|
||||
@@ -98,7 +98,7 @@ static bool threadEnabled = true;
|
||||
static bool threadStopped = false;
|
||||
static UITouch *g_touches[10];
|
||||
|
||||
__unsafe_unretained ViewController* sharedViewController;
|
||||
id<PPSSPPViewController> sharedViewController;
|
||||
static GraphicsContext *graphicsContext;
|
||||
static CameraHelper *cameraHelper;
|
||||
static LocationHelper *locationHelper;
|
||||
@@ -181,7 +181,6 @@ extern float g_safeInsetBottom;
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
[super viewDidAppear:animated];
|
||||
[self hideKeyboard];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
@@ -240,6 +239,8 @@ extern float g_safeInsetBottom;
|
||||
locationHelper = [[LocationHelper alloc] init];
|
||||
[locationHelper setDelegate:self];
|
||||
|
||||
[self hideKeyboard];
|
||||
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
|
||||
NativeInitGraphics(graphicsContext);
|
||||
|
||||
|
||||
Reference in new issue
Block a user