]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
2100 2100
authorToni Wilen <twilen@winuae.net>
Wed, 28 Apr 2010 14:27:05 +0000 (17:27 +0300)
committerToni Wilen <twilen@winuae.net>
Wed, 28 Apr 2010 14:27:05 +0000 (17:27 +0300)
od-win32/direct3d.cpp
od-win32/win32.h
od-win32/win32gui.cpp
zfile.cpp
zfile_archive.cpp

index 3912605ba4072e11300c71a4a43b714dabf230d5..ccb4088d5b91d1adb14da87b0e28e90d7a079285 100644 (file)
@@ -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);
index ef702193cc609b17a865e7047dfd3abc6f2afd8a..648a36193329b71b11388c83b199de3e7cbfdaea 100644 (file)
@@ -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
index 7f01041f9e27ecc3d2639d30c009a85783400af4..d4d407f18ed5a9fae41b7c86147d008543d3e3dc 100644 (file)
@@ -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);
                                }
                        }
index 09bd70d8f555f038e57158d6f63833448f35bcf8..97285cdf4f427d70f7a4107484915e946200c0a4 100644 (file)
--- 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));
index 1fa0df5379537b4c82e64fc7f7489bac5ba4c6f8..836aaa42cc1e6fbf3134aa6ff99996ee8dd8705c 100644 (file)
@@ -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);
                                }
                        }
                }