summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-01-05 02:32:29 +0100
committerLioncash <mathew1800@gmail.com>2019-01-05 03:45:18 +0100
commit9e8737b5355c63f55885db078a385cd3e0eb2628 (patch)
tree68538b34b67861fc804723ffe70af81a76909795 /src/core
parentservice/vi: Factor out scaling mode conversions from the IPC function itself (diff)
downloadyuzu-9e8737b5355c63f55885db078a385cd3e0eb2628.tar
yuzu-9e8737b5355c63f55885db078a385cd3e0eb2628.tar.gz
yuzu-9e8737b5355c63f55885db078a385cd3e0eb2628.tar.bz2
yuzu-9e8737b5355c63f55885db078a385cd3e0eb2628.tar.lz
yuzu-9e8737b5355c63f55885db078a385cd3e0eb2628.tar.xz
yuzu-9e8737b5355c63f55885db078a385cd3e0eb2628.tar.zst
yuzu-9e8737b5355c63f55885db078a385cd3e0eb2628.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/vi/vi.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp
index b0ae074c9..a295a288b 100644
--- a/src/core/hle/service/vi/vi.cpp
+++ b/src/core/hle/service/vi/vi.cpp
@@ -878,21 +878,19 @@ public:
private:
enum class ConvertedScaleMode : u64 {
- None = 0, // VI seems to name this as "Unknown" but lots of games pass it, assume it's no
- // scaling/default
- Freeze = 1,
- ScaleToWindow = 2,
- Crop = 3,
- NoCrop = 4,
+ Freeze = 0,
+ ScaleToWindow = 1,
+ ScaleAndCrop = 2,
+ None = 3,
+ PreserveAspectRatio = 4,
};
- // This struct is different, currently it's 1:1 but this might change in the future.
enum class NintendoScaleMode : u32 {
None = 0,
Freeze = 1,
ScaleToWindow = 2,
- Crop = 3,
- NoCrop = 4,
+ ScaleAndCrop = 3,
+ PreserveAspectRatio = 4,
};
void GetRelayService(Kernel::HLERequestContext& ctx) {
@@ -1007,14 +1005,14 @@ private:
IPC::ResponseBuilder rb{ctx, 2};
- if (scaling_mode > NintendoScaleMode::NoCrop) {
+ if (scaling_mode > NintendoScaleMode::PreserveAspectRatio) {
LOG_ERROR(Service_VI, "Invalid scaling mode provided.");
rb.Push(ERR_OPERATION_FAILED);
return;
}
if (scaling_mode != NintendoScaleMode::ScaleToWindow &&
- scaling_mode != NintendoScaleMode::NoCrop) {
+ scaling_mode != NintendoScaleMode::PreserveAspectRatio) {
LOG_ERROR(Service_VI, "Unsupported scaling mode supplied.");
rb.Push(ERR_UNSUPPORTED);
return;
@@ -1125,10 +1123,10 @@ private:
return MakeResult(ConvertedScaleMode::Freeze);
case NintendoScaleMode::ScaleToWindow:
return MakeResult(ConvertedScaleMode::ScaleToWindow);
- case NintendoScaleMode::Crop:
- return MakeResult(ConvertedScaleMode::Crop);
- case NintendoScaleMode::NoCrop:
- return MakeResult(ConvertedScaleMode::NoCrop);
+ case NintendoScaleMode::ScaleAndCrop:
+ return MakeResult(ConvertedScaleMode::ScaleAndCrop);
+ case NintendoScaleMode::PreserveAspectRatio:
+ return MakeResult(ConvertedScaleMode::PreserveAspectRatio);
default:
return ERR_OPERATION_FAILED;
}