From: Toni Wilen Date: Wed, 28 Apr 2010 14:27:05 +0000 (+0300) Subject: 2100 X-Git-Tag: 2100^0 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=efaecabc2921730b53942f5fffe1df05d82808d5;p=francis%2Fwinuae.git 2100 --- diff --git a/od-win32/direct3d.cpp b/od-win32/direct3d.cpp index 3912605b..ccb4088d 100644 --- a/od-win32/direct3d.cpp +++ b/od-win32/direct3d.cpp @@ -708,7 +708,7 @@ static LPD3DXEFFECT psEffect_LoadEffect (const TCHAR *shaderfile, int full) if (FAILED (hr)) { const char *str = psEnabled ? fx20 : fx10; int len = strlen (str); - if (!existsfile) { + if (!existsfile || canusefile == 0) { struct zfile *z = zfile_fopen (tmp, L"w", 0); if (z) { zfile_fwrite ((void*)str, len, 1, z); diff --git a/od-win32/win32.h b/od-win32/win32.h index ef702193..648a3619 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -18,9 +18,9 @@ #define WINUAEPUBLICBETA 0 #define LANG_DLL 1 -#define WINUAEBETA L"25" -#define WINUAEDATE MAKEBD(2010, 4, 25) -#define WINUAEEXTRA L"RC3" +#define WINUAEBETA L"" +#define WINUAEDATE MAKEBD(2010, 4, 28) +#define WINUAEEXTRA L"" #define WINUAEREV L"" #define IHF_WINDOWHIDDEN 6 diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 7f01041f..d4d407f1 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -12519,9 +12519,9 @@ int dragdrop (HWND hDlg, HDROP hd, struct uae_prefs *prefs, int currentpage) mask = ZFD_NORMAL; if (type < 0) { if (currentpage < 0) { - z = zfile_fopen (file, L"rb", mask); + z = zfile_fopen (file, L"rb", 0); if (z) { - int zip = iszip (z); + zip = iszip (z); zfile_fclose (z); } } diff --git a/zfile.cpp b/zfile.cpp index 09bd70d8..97285cdf 100644 --- a/zfile.cpp +++ b/zfile.cpp @@ -1159,10 +1159,8 @@ int iszip (struct zfile *z) TCHAR *ext = _tcsrchr (name, '.'); uae_u8 header[32]; int i; - int mask = z->zfdmask; + int mask = ZFD_NORMAL;//z->zfdmask; - if (!mask) - return 0; if (!ext) return 0; memset (header, 0, sizeof (header)); diff --git a/zfile_archive.cpp b/zfile_archive.cpp index 1fa0df53..836aaa42 100644 --- a/zfile_archive.cpp +++ b/zfile_archive.cpp @@ -188,15 +188,30 @@ struct zfile *archive_access_select (struct znode *parent, struct zfile *zf, uns select = -1; if (zf->zipname && zf->zipname[0] == '#' && _tstol (zf->zipname + 1) == zipcnt) select = -1; - if (select && !we_have_file) { - z = archive_getzfile (zn, id); - if (z) { - if (select < 0 || zfile_gettype (z)) - we_have_file = 1; - if (!we_have_file) { - zfile_fclose (z); - z = NULL; + if (select && we_have_file <= 0) { + struct zfile *zt = archive_getzfile (zn, id); + if (zt) { + int ft = zfile_gettype (zt); + if (select < 0 || ft) { + int whf = 1; + if (ft == ZFILE_CDIMAGE) { + TCHAR *ext = _tcsrchr (zn->fullname, '.'); + if (ext && we_have_file == 0) { + if (!_tcsicmp (ext, L".iso")) + whf = -1; // accept .cue if found later + } + } else if (we_have_file < 0) { + whf = 0; // ignore non-cdimage files if iso was found + } + if (whf) { + we_have_file = whf; + if (z) + zfile_fclose (z); + z = zt; + zt = NULL; + } } + zfile_fclose (zt); } } }