1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-21 13:20:11 +00:00

Add failure condition for loading custom camera view

This commit is contained in:
hawkeye 2023-09-02 00:36:32 -04:00
parent 6d80416f56
commit 9433a07e61

View file

@ -77,7 +77,7 @@ namespace MSFSPopoutPanelManager.Orchestration
else
{
LoadCustomView(AppSetting.PopOutSetting.AutoPanning.KeyBinding);
SetCockpitZoomLevel(50);
FlightSimOrchestrator.SetCockpitCameraZoomLevel(50);
}
WindowActionManager.BringWindowToForeground(ApplicationHandle);
@ -198,7 +198,7 @@ namespace MSFSPopoutPanelManager.Orchestration
private void LoadCustomView(string keybinding)
{
int retry = 20;
int retry = 3;
for (var i = 0; i < retry; i++)
{
InputEmulationManager.LoadCustomView(keybinding);
@ -210,7 +210,7 @@ namespace MSFSPopoutPanelManager.Orchestration
private void SetCockpitZoomLevel(int zoom)
{
int retry = 10;
int retry = 3;
for (var i = 0; i < retry; i++)
{
FlightSimOrchestrator.SetCockpitCameraZoomLevel(zoom);