load first match of splash*.png

This commit is contained in:
Chris Danford
2006-02-28 21:44:09 +00:00
parent 646e199e14
commit 01dcea30c1
2 changed files with 9 additions and 2 deletions
@@ -21,7 +21,9 @@ public:
RageFile f;
RString data;
if( f.Open("Data/splash.png") )
vector<RString> vs;
GetDirListing( "Data/splash*.png", vs, false, true );
if( !vs.empty() && f.Open(vs[0]) )
f.Read( data );
MakeNewCocoaWindow( data.data(), data.length() );
}
@@ -79,7 +79,12 @@ BOOL CALLBACK LoadingWindow_Win32::WndProc( HWND hWnd, UINT msg, WPARAM wParam,
switch( msg )
{
case WM_INITDIALOG:
g_hBitmap = LoadWin32Surface( "Data/splash.png", hWnd );
{
vector<RString> vs;
GetDirListing( "Data/splash*.png", vs, false, true );
if( !vs.empty() )
g_hBitmap = LoadWin32Surface( vs[0], hWnd );
}
if( g_hBitmap == NULL )
g_hBitmap = LoadWin32Surface( "Data/splash.bmp", hWnd );
SendMessage(