Remove a redundant function

This commit is contained in:
Henrik Rydgård 2024-05-22 16:02:13 +02:00
parent cc37476c79
commit 538cc62f16
5 changed files with 8 additions and 19 deletions

View File

@ -10,8 +10,7 @@
@property (nonatomic, strong) id<CameraFrameDelegate> delegate;
- (void) setCameraSize:(int)width h:(int)height;
- (void) startVideo;
- (void) startVideo:(int)width h:(int)height;
- (void) stopVideo;
@end

View File

@ -37,7 +37,7 @@ NSString *getSelectedCamera() {
if (granted) {
NSLog(@"camera permission granted");
dispatch_async(dispatch_get_main_queue(), ^{
[self startVideo];
[self startVideo:mWidth h:mHeight];
});
} else {
NSLog(@"camera permission denied");
@ -56,14 +56,10 @@ NSString *getSelectedCamera() {
}
}
-(void) setCameraSize: (int)width h:(int)height {
NSLog(@"CameraHelper::setCameraSize %dx%d", width, height);
-(void) startVideo: (int)width h:(int)height {
NSLog(@"CameraHelper::startVideo %dx%d", width, height);
mWidth = width;
mHeight = height;
}
-(void) startVideo {
NSLog(@"CameraHelper::startVideo");
if ([self checkPermission]) {
return;
}

View File

@ -16,6 +16,5 @@
extern id <PPSSPPViewController> sharedViewController;
void setCameraSize(int width, int height);
void startVideo();
void startVideo(int width, int height);
void stopVideo();

View File

@ -382,12 +382,8 @@ extern float g_safeInsetBottom;
}
}
void setCameraSize(int width, int height) {
[cameraHelper setCameraSize: width h:height];
}
void startVideo() {
[cameraHelper startVideo];
void startVideo(int width, int height) {
[cameraHelper startVideo: width h:height];
}
void stopVideo() {

View File

@ -429,8 +429,7 @@ bool System_MakeRequest(SystemRequestType type, int requestId, const std::string
if (!strncmp(param1.c_str(), "startVideo", 10)) {
int width = 0, height = 0;
sscanf(param1.c_str(), "startVideo_%dx%d", &width, &height);
setCameraSize(width, height);
startVideo();
startVideo(width, height);
} else if (!strcmp(param1.c_str(), "stopVideo")) {
stopVideo();
}