diff options
Diffstat (limited to 'src/video_core/present.h')
| -rw-r--r-- | src/video_core/present.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/video_core/present.h b/src/video_core/present.h new file mode 100644 index 000000000..4fdfcca68 --- /dev/null +++ b/src/video_core/present.h | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include "common/settings.h" | ||
| 7 | |||
| 8 | static inline Settings::ScalingFilter GetScalingFilter() { | ||
| 9 | return Settings::values.scaling_filter.GetValue(); | ||
| 10 | } | ||
| 11 | |||
| 12 | static inline Settings::AntiAliasing GetAntiAliasing() { | ||
| 13 | return Settings::values.anti_aliasing.GetValue(); | ||
| 14 | } | ||
| 15 | |||
| 16 | static inline Settings::ScalingFilter GetScalingFilterForAppletCapture() { | ||
| 17 | return Settings::ScalingFilter::Bilinear; | ||
| 18 | } | ||
| 19 | |||
| 20 | static inline Settings::AntiAliasing GetAntiAliasingForAppletCapture() { | ||
| 21 | return Settings::AntiAliasing::None; | ||
| 22 | } | ||
| 23 | |||
| 24 | struct PresentFilters { | ||
| 25 | Settings::ScalingFilter (*get_scaling_filter)(); | ||
| 26 | Settings::AntiAliasing (*get_anti_aliasing)(); | ||
| 27 | }; | ||
| 28 | |||
| 29 | constexpr PresentFilters PresentFiltersForDisplay{ | ||
| 30 | .get_scaling_filter = &GetScalingFilter, | ||
| 31 | .get_anti_aliasing = &GetAntiAliasing, | ||
| 32 | }; | ||
| 33 | |||
| 34 | constexpr PresentFilters PresentFiltersForAppletCapture{ | ||
| 35 | .get_scaling_filter = &GetScalingFilterForAppletCapture, | ||
| 36 | .get_anti_aliasing = &GetAntiAliasingForAppletCapture, | ||
| 37 | }; | ||