Skip to content

fix(linux): steamdeck pointer orientation #3893

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/platform/linux/kmsgrab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,9 @@ namespace platf {
auto props = plane_props(plane_id);
auto value = prop_value_by_name(props, "rotation"sv);
if (value) {
return *value;
BOOST_LOG(info) << "Found panel orientation ["sv << *value << "]";
return DRM_MODE_ROTATE_0;
//return *value;
}

BOOST_LOG(error) << "Failed to determine panel orientation, defaulting to landscape.";
Expand Down Expand Up @@ -695,13 +697,13 @@ namespace platf {

switch (card.get_panel_orientation(plane->plane_id)) {
case DRM_MODE_ROTATE_270:
BOOST_LOG(debug) << "Detected panel orientation at 90, swapping width and height.";
BOOST_LOG(warning) << "Detected panel orientation at 90 (DRM_MODE_ROTATE_270), swapping width and height.";
width = viewport.height;
height = viewport.width;
break;
case DRM_MODE_ROTATE_90:
case DRM_MODE_ROTATE_180:
BOOST_LOG(warning) << "Panel orientation is unsupported, screen capture may not work correctly.";
BOOST_LOG(warning) << "Panel orientation is unsupported (DRM_MODE_ROTATE_{90|180}), screen capture may not work correctly.";
break;
}

Expand Down
Loading