Skip to content

Commit

Permalink
DRMBackend: Change DeckHD check to be more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
misyltoad committed Jul 26, 2024
1 parent dec26d7 commit a215a8d
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/Backends/DRMBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2113,19 +2113,19 @@ namespace gamescope

drm_log.infof("Connector %s -> %s - %s", m_Mutable.szName, m_Mutable.szMakePNP, m_Mutable.szModel );

const bool bIsDeckHDUnofficial = ( m_Mutable.szMakePNP == "DHD"sv && m_Mutable.szModel == "DeckHD-1200p"sv );

const bool bSteamDeckDisplay =
( m_Mutable.szMakePNP == "WLC"sv && m_Mutable.szModel == "ANX7530 U"sv ) ||
( m_Mutable.szMakePNP == "ANX"sv && m_Mutable.szModel == "ANX7530 U"sv ) ||
( m_Mutable.szMakePNP == "VLV"sv && m_Mutable.szModel == "ANX7530 U"sv ) ||
( m_Mutable.szMakePNP == "VLV"sv && m_Mutable.szModel == "Jupiter"sv ) ||
( m_Mutable.szMakePNP == "DHD"sv && m_Mutable.szModel == "DeckHD-1200p"sv ) ||
( m_Mutable.szMakePNP == "VLV"sv && m_Mutable.szModel == "Galileo"sv );

if ( bSteamDeckDisplay )
{
static constexpr uint32_t kPIDGalileoSDC = 0x3003;
static constexpr uint32_t kPIDGalileoBOE = 0x3004;
static constexpr uint32_t kPIDJupiterDHD = 0x4001;

if ( pProduct->product == kPIDGalileoSDC )
{
Expand All @@ -2137,17 +2137,24 @@ namespace gamescope
m_Mutable.eKnownDisplay = GAMESCOPE_KNOWN_DISPLAY_STEAM_DECK_OLED_BOE;
m_Mutable.ValidDynamicRefreshRates = std::span( s_kSteamDeckOLEDRates );
}
else if (pProduct-> product == kPIDJupiterDHD ) {
m_Mutable.eKnownDisplay = GAMESCOPE_KNOWN_DISPLAY_STEAM_DECK_LCD_DHD;
m_Mutable.ValidDynamicRefreshRates = std::span( s_kSteamDeckLCDRates );
}
else
{
m_Mutable.eKnownDisplay = GAMESCOPE_KNOWN_DISPLAY_STEAM_DECK_LCD;
m_Mutable.ValidDynamicRefreshRates = std::span( s_kSteamDeckLCDRates );
}
}

if ( bIsDeckHDUnofficial )
{
static constexpr uint32_t kPIDJupiterDHD = 0x4001;

if ( pProduct->product == kPIDJupiterDHD )
{
m_Mutable.eKnownDisplay = GAMESCOPE_KNOWN_DISPLAY_STEAM_DECK_LCD_DHD;
m_Mutable.ValidDynamicRefreshRates = std::span( s_kSteamDeckLCDRates );
}
}

// Colorimetry
const char *pszColorOverride = getenv( "GAMESCOPE_INTERNAL_COLORIMETRY_OVERRIDE" );
if ( pszColorOverride && *pszColorOverride && GetScreenType() == GAMESCOPE_SCREEN_TYPE_INTERNAL )
Expand Down

0 comments on commit a215a8d

Please sign in to comment.