Files
ppsspp/ios/ViewController.h
T
Henrik RydgårdandClaude Opus 5.5 625db43746 tvOS: Back on the main screen goes to the home screen, like on Android
tvOS only does that with a Back press it gets to see, so the view controller
lets controller events through to UIKit while the top screen is top level
(the new TOP_LEVEL_CHANGED notification), and passes presses that aren't
keyboard keys on to super. Elsewhere Back stays ours.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 09:29:26 +02:00

60 lines
1.7 KiB
Objective-C

#pragma once
#include "ppsspp_config.h"
#import <UIKit/UIKit.h>
#import <GameController/GameController.h>
#if PPSSPP_PLATFORM(TVOS)
// The one view controller. Renders with Vulkan (MoltenVK) to a CAMetalLayer.
// A GCEventViewController, so controller input (the Siri Remote included) reaches us only through
// GCController, instead of also driving UIKit's focus engine.
@interface PPSSPPViewController : GCEventViewController
#else
#import <PhotosUI/PhotosUI.h>
#import "CameraHelper.h"
#import "LocationHelper.h"
// The one view controller. Renders with Vulkan (MoltenVK) to a CAMetalLayer.
@interface PPSSPPViewController : UIViewController<
PHPickerViewControllerDelegate,
CameraFrameDelegate, LocationHandlerDelegate,
UIGestureRecognizerDelegate>
#endif
- (void)hideKeyboard;
- (void)showKeyboard;
- (void)shareText:(NSString *)text;
- (void)shareFile:(NSURL *)url;
- (void)shutdown;
- (void)startLocation;
- (void)stopLocation;
- (void)startVideo:(int)width height:(int)height;
- (void)stopVideo;
- (void)appSwitchModeChanged;
- (void)immersiveModeChanged;
- (void)setupController:(GCController *)controller;
// Forwarded from the AppDelegate
- (void)didBecomeActive;
- (void)willResignActive;
- (void)uiStateChanged;
- (void)topLevelChanged;
- (void)pickPhoto:(NSString *)saveFilename requestId:(int)requestId;
- (void)updateResolutionWithView:(UIView *)view;
@end
extern PPSSPPViewController *sharedViewController;
#define IS_IPAD() ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad)
#define IS_IPHONE() ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone)
#define IS_TV() ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomTV)