{"id":18655886,"url":"https://github.com/michaelosthege/viewportreplicator","last_synced_at":"2025-11-05T19:30:32.585Z","repository":{"id":200364157,"uuid":"704219325","full_name":"michaelosthege/ViewportReplicator","owner":"michaelosthege","description":"A small app to move \u0026 rotate a DCS viewport","archived":false,"fork":false,"pushed_at":"2023-10-15T18:20:17.000Z","size":25425,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-27T14:41:13.363Z","etag":null,"topics":["dcs-world","dcsworld","flight-simulation","helios"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michaelosthege.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-12T19:42:32.000Z","updated_at":"2023-10-15T18:23:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"ed856814-18b4-48ea-a2ca-75bfd12e3376","html_url":"https://github.com/michaelosthege/ViewportReplicator","commit_stats":null,"previous_names":["michaelosthege/viewportreplicator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelosthege%2FViewportReplicator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelosthege%2FViewportReplicator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelosthege%2FViewportReplicator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelosthege%2FViewportReplicator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michaelosthege","download_url":"https://codeload.github.com/michaelosthege/ViewportReplicator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239470662,"owners_count":19644163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dcs-world","dcsworld","flight-simulation","helios"],"created_at":"2024-11-07T07:20:39.664Z","updated_at":"2025-11-05T19:30:32.533Z","avatar_url":"https://github.com/michaelosthege.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is this?\n\nThe `ViewportReplicator`, replicates a DCS World viewport and rotates it 180° to a specified region on the screen.\n\nThis is useful for DIY MFD screens using LCDs such as the CLAA070MA0ACW which must be rotated upside down for good image quality, but have a controller (PCB800099-v9) which does not respect the display orientation setting set by Windows.\n\nKnown alternatives to this option are:\n+ [Helios](https://github.com/HeliosVirtualCockpit/Helios) with a \"Screen Replicator\", but this has much lower FPS \u0026 does not support placement in the same spot.\n+ [Helios](https://github.com/HeliosVirtualCockpit/Helios) with a \"Screen Replicator (Adjustable)\", which might be faster, but likely also does not support placement in the same spot.\n\n\n## How this works\n\nIt uses [Direct3DHook](https://github.com/justinstenning/Direct3DHook) to grab screenshots from the original viewport area from the DirectX \"backbuffer\".\n\nStarting from the following `DualMFD.lua` monitor configuration:\n\n```lua\n_  = function(p) return p end\nname = _('4K_DualMFD')\ndescription = '4K main monitor with dual 800x600 MFDs to the right.'\n-- DO NOT USE CALCULATED COORDINATES because the Viewport Rotator only uses regex..\nFA_18C_LEFT_MFCD = { x = 3940, y = 0, width = 600, height = 595 }\nFA_18C_RIGHT_MFCD = { x = 3960, y = 600, width = 600, height = 595 }\nViewports = {\n  Center = {\n    x = 0,-- The HORIZONTAL starting location of the main display\n    y = 0,-- The starting VERTICAL position of the main display\n    width = 3840,-- The HORIZONTAL size of the main display\n    height = 2160,-- The VERTICAL size of the main display\n    aspect = 3840 / 2160,-- The aspect ratio of the main display\n    dx = 0,\n    dy = 0\n  }\n}\nUI = { x = 0, y = 0, width = 3840, height = 2160 }\nUIMainView = UI\nGU_MAIN_VIEWPORT = Viewports.Center\n```\n\nAnd these settings in the app:\n\n![](docs/screenshot_window.png)\n\nIt sreenshots the viewport in the original DCS output, marked in this screenshot by the yellow box.\n\n![](docs/screenshot_original.png)\n\nAfter clicking `Activate`, the app window resizes \u0026 positions itself in the specified area, with an image showing the screenshots rotated by 180°:\n\n![](docs/screenshot_rotated.png)\n\nThe default values for the viewport ID, and output area are currently hard-coded to my setup, but if this is useful for someone I'm open to PRs that make changes persistent.\nAnd if someone wants to do a PR to put this into Helios that'd be great too!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelosthege%2Fviewportreplicator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelosthege%2Fviewportreplicator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelosthege%2Fviewportreplicator/lists"}