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:
parent
6d80416f56
commit
9433a07e61
1 changed files with 3 additions and 3 deletions
|
@ -77,7 +77,7 @@ namespace MSFSPopoutPanelManager.Orchestration
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LoadCustomView(AppSetting.PopOutSetting.AutoPanning.KeyBinding);
|
LoadCustomView(AppSetting.PopOutSetting.AutoPanning.KeyBinding);
|
||||||
SetCockpitZoomLevel(50);
|
FlightSimOrchestrator.SetCockpitCameraZoomLevel(50);
|
||||||
}
|
}
|
||||||
|
|
||||||
WindowActionManager.BringWindowToForeground(ApplicationHandle);
|
WindowActionManager.BringWindowToForeground(ApplicationHandle);
|
||||||
|
@ -198,7 +198,7 @@ namespace MSFSPopoutPanelManager.Orchestration
|
||||||
|
|
||||||
private void LoadCustomView(string keybinding)
|
private void LoadCustomView(string keybinding)
|
||||||
{
|
{
|
||||||
int retry = 20;
|
int retry = 3;
|
||||||
for (var i = 0; i < retry; i++)
|
for (var i = 0; i < retry; i++)
|
||||||
{
|
{
|
||||||
InputEmulationManager.LoadCustomView(keybinding);
|
InputEmulationManager.LoadCustomView(keybinding);
|
||||||
|
@ -210,7 +210,7 @@ namespace MSFSPopoutPanelManager.Orchestration
|
||||||
|
|
||||||
private void SetCockpitZoomLevel(int zoom)
|
private void SetCockpitZoomLevel(int zoom)
|
||||||
{
|
{
|
||||||
int retry = 10;
|
int retry = 3;
|
||||||
for (var i = 0; i < retry; i++)
|
for (var i = 0; i < retry; i++)
|
||||||
{
|
{
|
||||||
FlightSimOrchestrator.SetCockpitCameraZoomLevel(zoom);
|
FlightSimOrchestrator.SetCockpitCameraZoomLevel(zoom);
|
||||||
|
|
Loading…
Reference in a new issue