diff --git a/ios/ViewController.h b/ios/ViewController.h index a9120dd758..e6f4f01c84 100644 --- a/ios/ViewController.h +++ b/ios/ViewController.h @@ -8,11 +8,11 @@ #import "CameraHelper.h" #import "LocationHelper.h" -#include "ViewControllerCommon.h" +#import "ViewControllerCommon.h" -@interface PPSSPPViewControllerGL : UIViewController diff --git a/ios/ViewController.mm b/ios/ViewController.mm index df7c2d754f..ab2a317b2a 100644 --- a/ios/ViewController.mm +++ b/ios/ViewController.mm @@ -12,7 +12,6 @@ #import "IAPManager.h" #import -#import "ViewController.h" #import "Controls.h" #import @@ -97,7 +96,7 @@ static std::atomic exitRenderLoop; static std::atomic renderLoopRunning; static std::thread g_renderLoopThread; -id sharedViewController; +PPSSPPBaseViewController *sharedViewController; @interface PPSSPPViewControllerGL () { ICadeTracker g_iCadeTracker; diff --git a/ios/ViewControllerCommon.h b/ios/ViewControllerCommon.h index e3c66381ce..7605f585a4 100644 --- a/ios/ViewControllerCommon.h +++ b/ios/ViewControllerCommon.h @@ -2,8 +2,7 @@ #import -@protocol PPSSPPViewController -@optional +@interface PPSSPPBaseViewController : UIViewController - (void)hideKeyboard; - (void)showKeyboard; @@ -26,7 +25,7 @@ @end -extern id sharedViewController; +extern PPSSPPBaseViewController *sharedViewController; #define IS_IPAD() ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) #define IS_IPHONE() ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone) diff --git a/ios/ViewControllerCommon.mm b/ios/ViewControllerCommon.mm index ff611ab217..f115c68b63 100644 --- a/ios/ViewControllerCommon.mm +++ b/ios/ViewControllerCommon.mm @@ -1,2 +1,12 @@ #import "ios/ViewControllerCommon.h" + +@interface PPSSPPBaseViewController () { +} + +@end + +@implementation PPSSPPBaseViewController { +} + +@end diff --git a/ios/ViewControllerMetal.h b/ios/ViewControllerMetal.h index 62d502da68..d06b523879 100644 --- a/ios/ViewControllerMetal.h +++ b/ios/ViewControllerMetal.h @@ -2,15 +2,15 @@ // Used by both Vulkan/MoltenVK and the future Metal backend. #pragma once -#include "ViewControllerCommon.h" +#import "ViewControllerCommon.h" #import "iCade/iCadeReaderView.h" #import "CameraHelper.h" #import "LocationHelper.h" -@interface PPSSPPViewControllerMetal : UIViewController< +@interface PPSSPPViewControllerMetal : PPSSPPBaseViewController< iCadeEventDelegate, LocationHandlerDelegate, CameraFrameDelegate, - UIGestureRecognizerDelegate, UIKeyInput, PPSSPPViewController, + UIGestureRecognizerDelegate, UIKeyInput, UIImagePickerControllerDelegate, UINavigationControllerDelegate> @end