Use SetClassLongPtr compatible for both Windows x86 and x64
This commit is contained in:
@@ -118,8 +118,7 @@ void LoadingWindow_Win32::SetIcon( const RageSurface *pIcon )
|
|||||||
|
|
||||||
m_hIcon = IconFromSurface( pIcon );
|
m_hIcon = IconFromSurface( pIcon );
|
||||||
if( m_hIcon != nullptr )
|
if( m_hIcon != nullptr )
|
||||||
// XXX: GCL_HICON isn't available on x86-64 Windows
|
SetClassLongPtrA( hwnd, GCLP_HICON, (LONG) m_hIcon );
|
||||||
SetClassLong( hwnd, GCL_HICON, (LONG) m_hIcon );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadingWindow_Win32::SetSplash( const RageSurface *pSplash )
|
void LoadingWindow_Win32::SetSplash( const RageSurface *pSplash )
|
||||||
|
|||||||
@@ -321,13 +321,13 @@ void GraphicsWindow::CreateGraphicsWindow( const VideoModeParams &p, bool bForce
|
|||||||
// Update the window icon.
|
// Update the window icon.
|
||||||
if( g_hIcon != nullptr )
|
if( g_hIcon != nullptr )
|
||||||
{
|
{
|
||||||
SetClassLong( g_hWndMain, GCL_HICON, (LONG) LoadIcon(nullptr,IDI_APPLICATION) );
|
SetClassLongPtrA( g_hWndMain, GCLP_HICON, (LONG) LoadIcon(nullptr,IDI_APPLICATION) );
|
||||||
DestroyIcon( g_hIcon );
|
DestroyIcon( g_hIcon );
|
||||||
g_hIcon = nullptr;
|
g_hIcon = nullptr;
|
||||||
}
|
}
|
||||||
g_hIcon = IconFromFile( p.sIconFile );
|
g_hIcon = IconFromFile( p.sIconFile );
|
||||||
if( g_hIcon != nullptr )
|
if( g_hIcon != nullptr )
|
||||||
SetClassLong( g_hWndMain, GCL_HICON, (LONG) g_hIcon );
|
SetClassLongPtrA( g_hWndMain, GCLP_HICON, (LONG) g_hIcon );
|
||||||
|
|
||||||
/* The window style may change as a result of switching to or from fullscreen;
|
/* The window style may change as a result of switching to or from fullscreen;
|
||||||
* apply it. Don't change the WS_VISIBLE bit. */
|
* apply it. Don't change the WS_VISIBLE bit. */
|
||||||
|
|||||||
Reference in New Issue
Block a user