From ced6ed76e97cbcc77f0328bc8653becd86e9cd2c Mon Sep 17 00:00:00 2001 From: kalaposfos13 <153381648+kalaposfos13@users.noreply.github.com> Date: Thu, 22 Jan 2026 15:24:11 +0100 Subject: [PATCH] get camera id from config --- src/common/config.cpp | 11 +++++++++++ src/common/config.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/src/common/config.cpp b/src/common/config.cpp index eac463d0a..afc0c6cec 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -154,6 +154,7 @@ static ConfigEntry isMotionControlsEnabled(true); static ConfigEntry useUnifiedInputConfig(true); static ConfigEntry defaultControllerID(""); static ConfigEntry backgroundControllerInput(false); +static ConfigEntry openCVCameraId(-1); // Audio static ConfigEntry micDevice("Default Device"); @@ -348,6 +349,13 @@ std::string getPadSpkOutputDevice() { return padSpkOutputDevice.get(); } +void SetOpenCVCameraId(s32 id) { + +} +s32 GetOpenCVCameraId() { + +} + double getTrophyNotificationDuration() { return trophyNotificationDuration.get(); } @@ -898,6 +906,7 @@ void load(const std::filesystem::path& path, bool is_game_specific) { useUnifiedInputConfig.setFromToml(input, "useUnifiedInputConfig", is_game_specific); backgroundControllerInput.setFromToml(input, "backgroundControllerInput", is_game_specific); usbDeviceBackend.setFromToml(input, "usbDeviceBackend", is_game_specific); + openCVCameraId.setFromToml(input, "openCVCameraId", is_game_specific); } if (data.contains("Audio")) { @@ -1083,6 +1092,7 @@ void save(const std::filesystem::path& path, bool is_game_specific) { backgroundControllerInput.setTomlValue(data, "Input", "backgroundControllerInput", is_game_specific); usbDeviceBackend.setTomlValue(data, "Input", "usbDeviceBackend", is_game_specific); + openCVCameraId.setTomlValue(data, "Input", "openCVCameraId", is_game_specific); micDevice.setTomlValue(data, "Audio", "micDevice", is_game_specific); mainOutputDevice.setTomlValue(data, "Audio", "mainOutputDevice", is_game_specific); @@ -1210,6 +1220,7 @@ void setDefaultValues(bool is_game_specific) { userName.set("shadPS4", is_game_specific); isShowSplash.set(false, is_game_specific); isSideTrophy.set("right", is_game_specific); + openCVCameraId.set(-1, is_game_specific); // GS - Input cursorState.set(HideCursorState::Idle, is_game_specific); diff --git a/src/common/config.h b/src/common/config.h index 2a95e6cf0..63ef5b4be 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -114,6 +114,8 @@ void setPadSpkOutputDevice(std::string device, bool is_game_specific = false); std::string getMicDevice(); void setCursorHideTimeout(int newcursorHideTimeout, bool is_game_specific = false); void setMicDevice(std::string device, bool is_game_specific = false); +void SetOpenCVCameraId(s32 id); +s32 GetOpenCVCameraId(); void setSeparateLogFilesEnabled(bool enabled, bool is_game_specific = false); bool getSeparateLogFilesEnabled(); u32 GetLanguage();