mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Renaming and comments
This commit is contained in:
parent
3166eee3f0
commit
b1a435840c
5 changed files with 18 additions and 11 deletions
|
@ -2,13 +2,13 @@
|
|||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@class ViewController;
|
||||
@class PPSSPPViewControllerGL;
|
||||
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
||||
|
||||
@property (strong, nonatomic) UIWindow *window;
|
||||
@property (strong, nonatomic) UIScreen *screen;
|
||||
|
||||
@property (strong, nonatomic) ViewController *viewController;
|
||||
@property (strong, nonatomic) PPSSPPViewControllerGL *viewController;
|
||||
|
||||
@end
|
||||
|
|
|
@ -89,9 +89,10 @@
|
|||
NSString *bundlePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/assets/"];
|
||||
NativeInit(argc, (const char**)argv, documentsPath.UTF8String, bundlePath.UTF8String, NULL);
|
||||
|
||||
|
||||
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
|
||||
self.viewController = [[ViewController alloc] init];
|
||||
|
||||
// Here we can switch viewcontroller depending on backend.
|
||||
self.viewController = [[PPSSPPViewControllerGL alloc] init];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleAudioSessionInterruption:) name:AVAudioSessionInterruptionNotification object:[AVAudioSession sharedInstance]];
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
- (void)bindDefaultFBO;
|
||||
@end
|
||||
|
||||
@interface ViewController : GLKViewController <
|
||||
@interface PPSSPPViewControllerGL : GLKViewController <
|
||||
iCadeEventDelegate, LocationHandlerDelegate, CameraFrameDelegate,
|
||||
UIGestureRecognizerDelegate, UIKeyInput, PPSSPPViewController>
|
||||
@end
|
||||
|
|
|
@ -45,9 +45,9 @@
|
|||
#define IS_IPAD() ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad)
|
||||
#define IS_IPHONE() ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone)
|
||||
|
||||
class IOSGraphicsContext : public GraphicsContext {
|
||||
class IOSGLESContext : public GraphicsContext {
|
||||
public:
|
||||
IOSGraphicsContext() {
|
||||
IOSGLESContext() {
|
||||
CheckGLExtensions();
|
||||
draw_ = Draw::T3DCreateGLContext(false);
|
||||
renderManager_ = (GLRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
|
||||
|
@ -56,7 +56,7 @@ public:
|
|||
bool success = draw_->CreatePresets();
|
||||
_assert_msg_(success, "Failed to compile preset shaders");
|
||||
}
|
||||
~IOSGraphicsContext() {
|
||||
~IOSGLESContext() {
|
||||
delete draw_;
|
||||
}
|
||||
Draw::DrawContext *GetDrawContext() override {
|
||||
|
@ -103,7 +103,7 @@ static GraphicsContext *graphicsContext;
|
|||
static CameraHelper *cameraHelper;
|
||||
static LocationHelper *locationHelper;
|
||||
|
||||
@interface ViewController () {
|
||||
@interface PPSSPPViewControllerGL () {
|
||||
std::map<uint16_t, InputKeyCode> iCadeToKeyMap;
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ static LocationHelper *locationHelper;
|
|||
|
||||
@end
|
||||
|
||||
@implementation ViewController
|
||||
@implementation PPSSPPViewControllerGL
|
||||
|
||||
-(id) init {
|
||||
self = [super init];
|
||||
|
@ -209,7 +209,7 @@ extern float g_safeInsetBottom;
|
|||
|
||||
[[DisplayManager shared] updateResolution:[UIScreen mainScreen]];
|
||||
|
||||
graphicsContext = new IOSGraphicsContext();
|
||||
graphicsContext = new IOSGLESContext();
|
||||
|
||||
graphicsContext->GetDrawContext()->SetErrorCallback([](const char *shortDesc, const char *details, void *userdata) {
|
||||
g_OSD.Show(OSDType::MESSAGE_ERROR, details, 0.0f, "error_callback");
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
// main.mm boilerplate
|
||||
//
|
||||
// Overview
|
||||
//
|
||||
// main.mm: JIT enablement, starting the next step
|
||||
// AppDelegate.mm: Runs NativeInit, launches the main ViewController
|
||||
// ViewController.mm: The main application window
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <dlfcn.h>
|
||||
|
|
Loading…
Add table
Reference in a new issue