Skip to content

"Can't find background image" #325

@DavidBuchanan314

Description

@DavidBuchanan314

Trying to launch portal2, I get Can't find background image 'materials/console/background_menu_widescreen.vtf', and trying to launch hl2 I get Can't find background image 'materials/console/background01_widescreen.vtf'. Both of these errors are presented as a dialog box on a black screen, after which the game exits.

At first I thought maybe these files were just missing from my copy of the games, and they are, but I've tried several versions and they're not present in any of them.

Any ideas?

fwiw I'm running on aarch64 Asahi Fedora, which may be related somehow. I had to set SDL_VIDEODRIVER=x11 to get the game to boot at all.

With some naive code searching, it seems like this function might be related?

void CVideoMode_Common::ComputeStartupGraphicName( char *pBuf, int nBufLen )
{
char szBackgroundName[_MAX_PATH];
CL_GetBackgroundLevelName( szBackgroundName, sizeof(szBackgroundName), false );
float aspectRatio = (float)GetModeStereoWidth() / GetModeStereoHeight();
if ( aspectRatio >= 1.6f )
{
// use the widescreen version
Q_snprintf( pBuf, nBufLen, "materials/console/%s_widescreen.vtf", szBackgroundName );
}
else
{
Q_snprintf( pBuf, nBufLen, "materials/console/%s.vtf", szBackgroundName );
}
if ( !g_pFileSystem->FileExists( pBuf, "GAME" ) )
{
Q_strncpy( pBuf, ( aspectRatio >= 1.6f ) ? "materials/console/background01_widescreen.vtf" : "materials/console/background01.vtf", nBufLen );
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions