turn on live feedback overlay on controller arrival
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
- (void)gamepadPresenceChanged;
|
||||
- (void)mousePresenceChanged;
|
||||
- (void)streamExitRequested;
|
||||
- (void)controllerArrivalWithPlayerIndex:(int8_t)index;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -781,6 +781,8 @@ static const double MOUSE_SPEED_DIVISOR = 1.25;
|
||||
if (controller) {
|
||||
// This is a physical controller with a corresponding GCController object
|
||||
|
||||
[_delegate controllerArrivalWithPlayerIndex:voidController.playerIndex];
|
||||
|
||||
// Start is always present
|
||||
supportedButtonFlags |= PLAY_FLAG;
|
||||
|
||||
|
||||
@@ -3129,7 +3129,6 @@ import ObjectiveC.runtime
|
||||
!autoDockIsDocked else {
|
||||
return
|
||||
}
|
||||
print("autoDockIdleDuration \(autoDockIdleDuration) \(CACurrentMediaTime())")
|
||||
autoDockTimer = Timer.scheduledTimer(withTimeInterval: autoDockIdleDuration, repeats: false) { [weak self] _ in
|
||||
self?.autoDockWidgetToNearestEdge()
|
||||
}
|
||||
|
||||
@@ -614,9 +614,10 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
// get streamFrameVC
|
||||
if(!self->_streamFrameVC) self->_streamFrameVC = [self parentViewController];
|
||||
|
||||
/*
|
||||
if (@available(iOS 13.0, *)) {
|
||||
if(oscProfile.gamepadOverlayEnabled) [(StreamFrameViewController* )self->_streamFrameVC loadAbstractGamepadOverlayIfNeeded];
|
||||
}
|
||||
} */
|
||||
|
||||
// bool customOscEnabled = [self isOscEnabled] && settings.onscreenControls.intValue == OnScreenControlsLevelCustom;
|
||||
|
||||
|
||||
@@ -362,7 +362,7 @@
|
||||
if (reloadSettings) {
|
||||
_settings = [[[DataManager alloc] init] getSettings]; //StreamFrameViewController retrieve the settings here.
|
||||
}
|
||||
_oscProfile = [[OSCProfilesManager sharedManager:CGRectZero] getSelectedProfile];
|
||||
if(!_viewJustLoaded) _oscProfile = [[OSCProfilesManager sharedManager:CGRectZero] getSelectedProfile];
|
||||
|
||||
overlayLevel = _settings.statsOverlayLevel.intValue;
|
||||
[self setupOverlayView];
|
||||
@@ -622,6 +622,8 @@
|
||||
[_spinner startAnimating];
|
||||
_spinner.center = CGPointMake(self.view.frame.size.width / 2, self.view.frame.size.height / 2 - _stageLabel.frame.size.height - _spinner.frame.size.height);
|
||||
|
||||
_oscProfile = [[OSCProfilesManager sharedManager:CGRectZero] getSelectedProfile];
|
||||
|
||||
_controllerSupport = [[ControllerSupport alloc] initWithConfig:self.streamConfig delegate:self];
|
||||
_inactivityTimer = nil;
|
||||
|
||||
@@ -1766,6 +1768,14 @@
|
||||
dispatch_after(delayTime, dispatch_get_main_queue(), block);
|
||||
}
|
||||
|
||||
- (void)controllerArrivalWithPlayerIndex:(int8_t)index{
|
||||
if(index == 0 && _oscProfile.gamepadOverlayEnabled){
|
||||
if (@available(iOS 13.0, *)) {
|
||||
[self loadAbstractGamepadOverlayIfNeeded];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)toggleGamepadOverlayWithOverlayEnabled:(BOOL)overlayEnabled API_AVAILABLE(ios(13.0)){
|
||||
if(overlayEnabled) [self loadAbstractGamepadOverlayIfNeeded];
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user