@echo off
rem Flight Simulator Device: start a VR session with one double click.
rem Put this on the desktop. Edit the three settings below once.

rem Which sim: msfs2024, xplane12, or dcs
set SIM=msfs2024

rem Meta Horizon Link PC app. If this path is wrong, right click its Start menu shortcut, Open file location, and copy the target here.
set LINKAPP=C:\Program Files\Oculus\Support\oculus-client\OculusClient.exe

rem OpenXR Motion Compensation runs inside the sim on its own once installed, so it needs no line here.

if exist "%LINKAPP%" (
    echo Starting the Meta Horizon Link app...
    start "" "%LINKAPP%"
    timeout /t 10 /nobreak >nul
) else (
    echo Link app not found at %LINKAPP%, edit LINKAPP in this file.
)

echo Put on the headset and accept "Enable Link" if asked.
timeout /t 5 /nobreak >nul

if /i "%SIM%"=="msfs2024" start "" "steam://rungameid/2537590"
if /i "%SIM%"=="xplane12" start "" "steam://rungameid/2014780"
if /i "%SIM%"=="dcs" start "" "steam://run/223750//--force_enable_VR --force_OpenXR/"
