feature: Add dummy mode

This commit is contained in:
Tera << 8 2025-06-27 12:26:54 -04:00
parent f79657afc2
commit 8b482cecd5
Signed by: imterah
GPG key ID: 8FA7DD57BA6CEA37
40 changed files with 323 additions and 141 deletions

View file

@ -4,6 +4,7 @@ import (
"fmt"
"git.terah.dev/UnrealXR/unrealxr/ardriver/commons"
"git.terah.dev/UnrealXR/unrealxr/ardriver/dummy"
"git.terah.dev/UnrealXR/unrealxr/ardriver/xreal"
)
@ -19,5 +20,16 @@ func GetDevice() (commons.ARDevice, error) {
return device, nil
}
if dummy.IsDummyDeviceEnabled {
device, err := dummy.New()
if err != nil {
fmt.Printf("failed to initialize dummy device: %w\n", err)
return nil, err
}
return device, nil
}
return nil, fmt.Errorf("failed to initialize any device")
}