mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-11 16:49:27 +01:00
The view controller was the keyboard's text input, and UIKit hands first responder back to it whenever something it presented goes away: a share sheet, a photo picker, the alert after an app icon change. Each time, up came the keyboard, and hideKeyboard calls were sprinkled around to put it away again, one on a four second timer. Text input now goes to a small view that only becomes first responder when a text field gets focus. The view controller is first responder otherwise, for hardware keyboard presses, but takes no text, so it can't bring up the keyboard. The workaround hideKeyboard calls are gone, and so is the endEditing on rotation, which dropped the keyboard if you turned the phone while typing. Showing and hiding are synchronous now, since every caller is on the main thread. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
46 lines
1.3 KiB
Objective-C
46 lines
1.3 KiB
Objective-C
#pragma once
|
|
|
|
#import <UIKit/UIKit.h>
|
|
#import <PhotosUI/PhotosUI.h>
|
|
|
|
#import <GameController/GameController.h>
|
|
|
|
#import "CameraHelper.h"
|
|
#import "LocationHelper.h"
|
|
#import "iCade/iCadeReaderView.h"
|
|
|
|
@interface PPSSPPBaseViewController : UIViewController<
|
|
UIImagePickerControllerDelegate, UINavigationControllerDelegate,
|
|
PHPickerViewControllerDelegate,
|
|
CameraFrameDelegate, LocationHandlerDelegate,
|
|
UIGestureRecognizerDelegate, iCadeEventDelegate>
|
|
|
|
- (void)hideKeyboard;
|
|
- (void)showKeyboard;
|
|
- (void)shareText:(NSString *)text;
|
|
- (void)shareFile:(NSURL *)url;
|
|
- (void)shutdown;
|
|
- (void)bindDefaultFBO;
|
|
- (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)pickPhoto:(NSString *)saveFilename requestId:(int)requestId;
|
|
- (void)updateResolutionWithView:(UIView *)view;
|
|
|
|
@end
|
|
|
|
extern PPSSPPBaseViewController *sharedViewController;
|
|
|
|
#define IS_IPAD() ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad)
|
|
#define IS_IPHONE() ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone)
|