diff options
| author | xXJsonDeruloXx <danielhimebauch@gmail.com> | 2026-08-01 14:46:52 -0400 |
|---|---|---|
| committer | xXJsonDeruloXx <danielhimebauch@gmail.com> | 2026-08-01 14:46:52 -0400 |
| commit | 17bd262f603e2a8a250e2942eca41e5c622d8940 (patch) | |
| tree | 4c834f083d2e116cb6f307d098c4b1bc04c511b8 /include | |
| download | decky-lsfg-vk-17bd262f603e2a8a250e2942eca41e5c622d8940.tar.gz decky-lsfg-vk-17bd262f603e2a8a250e2942eca41e5c622d8940.zip | |
Squashed 'vendor/bionic-fg/' content from commit 9a81c36
git-subtree-dir: vendor/bionic-fg
git-subtree-split: 9a81c36d1017c3f1c85e395df8545a93868492df
Diffstat (limited to 'include')
| -rw-r--r-- | include/bionic_fg/config.hpp | 23 | ||||
| -rw-r--r-- | include/bionic_fg/session.hpp | 39 |
2 files changed, 62 insertions, 0 deletions
diff --git a/include/bionic_fg/config.hpp b/include/bionic_fg/config.hpp new file mode 100644 index 0000000..9e20a2b --- /dev/null +++ b/include/bionic_fg/config.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include <cstdint> + +namespace bionic_fg { + +struct Config { + uint32_t width = 0; + uint32_t height = 0; + uint32_t multiplier = 2; + float flowScale = 0.6f; + uint32_t model = 0; + + void sanitize() { + if (multiplier < 2) multiplier = 0; + if (multiplier > 4) multiplier = 4; + if (flowScale < 0.2f) flowScale = 0.2f; + if (flowScale > 1.0f) flowScale = 1.0f; + if (model > 1) model = 1; + } +}; + +} // namespace bionic_fg diff --git a/include/bionic_fg/session.hpp b/include/bionic_fg/session.hpp new file mode 100644 index 0000000..08e57f8 --- /dev/null +++ b/include/bionic_fg/session.hpp @@ -0,0 +1,39 @@ +#pragma once + +#include "bionic_fg/config.hpp" + +#include <cstddef> +#include <cstdint> +#include <memory> +#include <string> + +namespace bionic_fg { + +class Session { +public: + explicit Session(Config config); + + const Config& config() const { return config_; } + void updateConfig(Config config); + + bool isReadyForHostIntegration() const { return readyForHostIntegration_; } + std::size_t embeddedShaderCount() const { return embeddedShaderCount_; } + std::size_t validShaderCount() const { return validShaderCount_; } + + std::string describe() const; + + static std::size_t EmbeddedShaderCount(); + static std::size_t ValidEmbeddedShaderCount(); + static std::string DescribeEmbeddedBundle(); + +private: + Config config_; + bool readyForHostIntegration_ = false; + std::size_t embeddedShaderCount_ = 0; + std::size_t validShaderCount_ = 0; + std::uint64_t createdAtMs_ = 0; +}; + +using SessionPtr = std::unique_ptr<Session>; + +} // namespace bionic_fg |
