mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
engine: platform: sdl: fix loading ICO when it's in RoDir
This commit is contained in:
parent
3e23634369
commit
5285f51a26
@ -628,6 +628,7 @@ qboolean VID_CreateWindow( int width, int height, qboolean fullscreen )
|
|||||||
qboolean iconLoaded = false;
|
qboolean iconLoaded = false;
|
||||||
char iconpath[MAX_STRING];
|
char iconpath[MAX_STRING];
|
||||||
int xpos, ypos;
|
int xpos, ypos;
|
||||||
|
const char *localIcoPath;
|
||||||
|
|
||||||
if( vid_highdpi->value ) wndFlags |= SDL_WINDOW_ALLOW_HIGHDPI;
|
if( vid_highdpi->value ) wndFlags |= SDL_WINDOW_ALLOW_HIGHDPI;
|
||||||
Q_strncpy( wndname, GI->title, sizeof( wndname ));
|
Q_strncpy( wndname, GI->title, sizeof( wndname ));
|
||||||
@ -687,13 +688,11 @@ qboolean VID_CreateWindow( int width, int height, qboolean fullscreen )
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if XASH_WIN32 // ICO support only for Win32
|
#if XASH_WIN32 // ICO support only for Win32
|
||||||
if( FS_FileExists( GI->iconpath, true ) )
|
if(( localIcoPath = FS_GetDiskPath( GI->iconpath, true )))
|
||||||
{
|
{
|
||||||
HICON ico;
|
HICON ico;
|
||||||
char localPath[MAX_PATH];
|
|
||||||
|
|
||||||
Q_snprintf( localPath, sizeof( localPath ), "%s/%s", GI->gamefolder, GI->iconpath );
|
ico = (HICON)LoadImage( NULL, localIcoPath, IMAGE_ICON, 0, 0, LR_LOADFROMFILE|LR_DEFAULTSIZE );
|
||||||
ico = (HICON)LoadImage( NULL, localPath, IMAGE_ICON, 0, 0, LR_LOADFROMFILE|LR_DEFAULTSIZE );
|
|
||||||
|
|
||||||
if( ico )
|
if( ico )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user