turn on live feedback overlay on controller arrival
This commit is contained in:
1 parent
00b06b7b70
commit
984a1acd48
5 files changed
+16
-3
No files matched your search
@@ -16,6 +16,7 @@
|
|||||||
- (void)gamepadPresenceChanged;
|
- (void)gamepadPresenceChanged;
|
||||||
- (void)mousePresenceChanged;
|
- (void)mousePresenceChanged;
|
||||||
- (void)streamExitRequested;
|
- (void)streamExitRequested;
|
||||||
|
- (void)controllerArrivalWithPlayerIndex:(int8_t)index;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|||||||
@@ -781,6 +781,8 @@ static const double MOUSE_SPEED_DIVISOR = 1.25;
|
|||||||
if (controller) {
|
if (controller) {
|
||||||
// This is a physical controller with a corresponding GCController object
|
// This is a physical controller with a corresponding GCController object
|
||||||
|
|
||||||
|
[_delegate controllerArrivalWithPlayerIndex:voidController.playerIndex];
|
||||||
|
|
||||||
// Start is always present
|
// Start is always present
|
||||||
supportedButtonFlags |= PLAY_FLAG;
|
supportedButtonFlags |= PLAY_FLAG;
|
||||||
|
|
||||||
|
|||||||
@@ -3129,7 +3129,6 @@ import ObjectiveC.runtime
|
|||||||
!autoDockIsDocked else {
|
!autoDockIsDocked else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
print("autoDockIdleDuration \(autoDockIdleDuration) \(CACurrentMediaTime())")
|
|
||||||
autoDockTimer = Timer.scheduledTimer(withTimeInterval: autoDockIdleDuration, repeats: false) { [weak self] _ in
|
autoDockTimer = Timer.scheduledTimer(withTimeInterval: autoDockIdleDuration, repeats: false) { [weak self] _ in
|
||||||
self?.autoDockWidgetToNearestEdge()
|
self?.autoDockWidgetToNearestEdge()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -614,9 +614,10 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
|||||||
// get streamFrameVC
|
// get streamFrameVC
|
||||||
if(!self->_streamFrameVC) self->_streamFrameVC = [self parentViewController];
|
if(!self->_streamFrameVC) self->_streamFrameVC = [self parentViewController];
|
||||||
|
|
||||||
|
/*
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *)) {
|
||||||
if(oscProfile.gamepadOverlayEnabled) [(StreamFrameViewController* )self->_streamFrameVC loadAbstractGamepadOverlayIfNeeded];
|
if(oscProfile.gamepadOverlayEnabled) [(StreamFrameViewController* )self->_streamFrameVC loadAbstractGamepadOverlayIfNeeded];
|
||||||
}
|
} */
|
||||||
|
|
||||||
// bool customOscEnabled = [self isOscEnabled] && settings.onscreenControls.intValue == OnScreenControlsLevelCustom;
|
// bool customOscEnabled = [self isOscEnabled] && settings.onscreenControls.intValue == OnScreenControlsLevelCustom;
|
||||||
|
|
||||||
|
|||||||
@@ -362,7 +362,7 @@
|
|||||||
if (reloadSettings) {
|
if (reloadSettings) {
|
||||||
_settings = [[[DataManager alloc] init] getSettings]; //StreamFrameViewController retrieve the settings here.
|
_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;
|
overlayLevel = _settings.statsOverlayLevel.intValue;
|
||||||
[self setupOverlayView];
|
[self setupOverlayView];
|
||||||
@@ -622,6 +622,8 @@
|
|||||||
[_spinner startAnimating];
|
[_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);
|
_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];
|
_controllerSupport = [[ControllerSupport alloc] initWithConfig:self.streamConfig delegate:self];
|
||||||
_inactivityTimer = nil;
|
_inactivityTimer = nil;
|
||||||
|
|
||||||
@@ -1766,6 +1768,14 @@
|
|||||||
dispatch_after(delayTime, dispatch_get_main_queue(), block);
|
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)){
|
- (void)toggleGamepadOverlayWithOverlayEnabled:(BOOL)overlayEnabled API_AVAILABLE(ios(13.0)){
|
||||||
if(overlayEnabled) [self loadAbstractGamepadOverlayIfNeeded];
|
if(overlayEnabled) [self loadAbstractGamepadOverlayIfNeeded];
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in new issue
Block a user