Skip to content
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

script: GPD Win Max 2 display configuration #1627

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
31 changes: 31 additions & 0 deletions scripts/00-gamescope/displays/gpd.winmax2.lcd.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
local winmax2_lcd_refresh_rates = {
40, 60
}

gamescope.config.known_displays.winmax2_lcd = {
pretty_name = "GPD Win Max 2 LCD",
hdr = {
-- Setup some fallbacks for undocking with HDR, meant
-- for the internal panel. It does not support HDR.
supported = false,
force_enabled = false,
eotf = gamescope.eotf.gamma22,
max_content_light_level = 500,
max_frame_average_luminance = 500,
min_content_light_level = 0.5
},

dynamic_refresh_rates = winmax2_lcd_refresh_rates,
dynamic_modegen = function(base_mode, refresh)
return base_mode
end,

matches = function(display)
if display.vendor == "JDI" and display.model == "GPD1001H" then
debug("[winmax2_lcd] Matched vendor: "..display.vendor.." model: "..display.model.." product:"..display.product)
return 5000
end
end
}
debug("Registered GPD Win Max 2 LCD as a known display")
--debug(inspect(gamescope.config.known_displays.winmax2_lcd))