]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
2200b9
authorToni Wilen <twilen@winuae.net>
Fri, 11 Jun 2010 18:38:49 +0000 (21:38 +0300)
committerToni Wilen <twilen@winuae.net>
Fri, 11 Jun 2010 18:38:49 +0000 (21:38 +0300)
15 files changed:
filesys.asm
filesys_bootrom.cpp
od-win32/dinput.cpp
od-win32/direct3d.cpp
od-win32/hardfile_win32.cpp
od-win32/resources/resource
od-win32/resources/winuae.rc
od-win32/win32.cpp
od-win32/win32.h
od-win32/win32gfx.cpp
od-win32/win32gui.cpp
rommgr.cpp
uaeunp.cpp
zfile.cpp
zfile_archive.cpp

index 2231477ace244bfdd888c64aad971560db891e36..523b44d2f4e1516d845ba3cd7bef3e24b0d74230 100644 (file)
@@ -250,9 +250,9 @@ FSIN_chip_done
        move.w #$FF80,d0
        bsr.w getrtbase
        jsr (a0) ; d1 = size, a1 = start address
-       beq.s FSIN_fchip_done
        move.l a1,a0
        move.l d1,d0
+       beq.s FSIN_fchip_done
        move.l d4,d1
        moveq #-5,d2
        lea fchipname(pc),a1
index 23745ac0c0edd830e152a73c6d0ab5d5dde0fc47..9b150eb3f356e6a5ca02c965bd5ce87e9ee0c671 100644 (file)
@@ -22,9 +22,9 @@
  db(0x22); db(0x4e); db(0x20); db(0x08); db(0x30); db(0x7c); db(0xff); db(0xb8);
  db(0x4e); db(0xae); db(0xfe); db(0x5c); db(0x61); db(0x00); db(0x11); db(0xfe);
  db(0x61); db(0x00); db(0x15); db(0xb0); db(0x4c); db(0xdf); db(0x7e); db(0xff);
- db(0x4e); db(0x75); db(0x4e); db(0xae); db(0x08); db(0x00); db(0x00); db(0x02);
+ db(0x4e); db(0x75); db(0x00); db(0x00); db(0x08); db(0x00); db(0x00); db(0x02);
  db(0x67); db(0x06); db(0x4e); db(0xb9); db(0x00); db(0xf0); db(0x00); db(0x00);
- db(0x4e); db(0xf9); db(0x00); db(0xf0); db(0x00); db(0x00); db(0x28); db(0x40);
+ db(0x4e); db(0xf9); db(0x00); db(0xf0); db(0x00); db(0x00); db(0x00); db(0x00);
  db(0x48); db(0xe7); db(0xff); db(0xfe); db(0x2c); db(0x78); db(0x00); db(0x04);
  db(0x30); db(0x3c); db(0xff); db(0xfc); db(0x61); db(0x00); db(0x0b); db(0xaa);
  db(0x2a); db(0x50); db(0x43); db(0xfa); db(0x16); db(0xf3); db(0x70); db(0x24);
@@ -51,7 +51,7 @@
  db(0x00); db(0x20); db(0x00); db(0x00); db(0x90); db(0x88); db(0x65); db(0x08);
  db(0x67); db(0x06); db(0x93); db(0xc9); db(0x4e); db(0xae); db(0xfd); db(0x96);
  db(0x30); db(0x3c); db(0xff); db(0x80); db(0x61); db(0x00); db(0x0a); db(0xea);
- db(0x4e); db(0x90); db(0x67); db(0x10); db(0x20); db(0x49); db(0x20); db(0x01);
+ db(0x4e); db(0x90); db(0x20); db(0x49); db(0x20); db(0x01); db(0x67); db(0x0c);
  db(0x22); db(0x04); db(0x74); db(0xfb); db(0x43); db(0xfa); db(0x16); db(0x4f);
  db(0x4e); db(0xae); db(0xfd); db(0x96); db(0x41); db(0xfa); db(0x15); db(0xc6);
  db(0x43); db(0xfa); db(0x00); db(0x54); db(0x70); db(0x0a); db(0x61); db(0x00);
index 819eb45dc9396ff6f25073edc8a70e613ac361c6..643d6318710c04ae99a65e60db74bcea9011994a 100644 (file)
@@ -1454,7 +1454,6 @@ static BOOL di_enumcallback2 (LPCDIDEVICEINSTANCE lpddi, int joy)
        if (!memcmp (&did->iguid, &GUID_SysKeyboard, sizeof (GUID)) || !memcmp (&did->iguid, &GUID_SysMouse, sizeof (GUID))) {
                did->priority = 2;
                did->superdevice = 1;
-               _tcscat (did->name, L" *");
        }
        return DIENUM_CONTINUE;
 }
index 3a8206ae16acfadf81b71361f150c3de1f16ee86..09d426647a5a88621ba458e5a2a1c1696f421c08 100644 (file)
@@ -8,7 +8,8 @@
 #if defined (D3D) && defined (GFXFILTER)
 
 #define EFFECT_VERSION 2
-#define D3DX9DLL L"d3dx9_43.dll"
+#define D3DX9DLL1 L"d3dx9_42.dll"
+#define D3DX9DLL2 L"d3dx9_43.dll"
 
 #include "options.h"
 #include "xwin.h"
@@ -445,7 +446,7 @@ int D3D_canshaders (void)
        if (d3d_yesno > 0)
                return 1;
        d3d_yesno = -1;
-       h = LoadLibrary (D3DX9DLL);
+       h = LoadLibrary (D3DX9DLL1);
        if (h != NULL) {
                FreeLibrary (h);
                d3dx = Direct3DCreate9 (D3D_SDK_VERSION);
@@ -1570,9 +1571,9 @@ const TCHAR *D3D_init (HWND ahwnd, int w_w, int w_h, int t_w, int t_h, int depth
                return errmsg;
        }
 
-       d3dx = LoadLibrary (D3DX9DLL);
+       d3dx = LoadLibrary (os_vista ? D3DX9DLL2 : D3DX9DLL1);
        if (d3dx == NULL) {
-               _tcscpy (errmsg, L"Direct3D: June 2010 or newer DirectX Runtime required.\n\nhttp://go.microsoft.com/fwlink/?linkid=56513");
+               _tcscpy (errmsg, L"Direct3D: Newer DirectX Runtime required.\n\nhttp://go.microsoft.com/fwlink/?linkid=56513");
                if (isfullscreen () <= 0)
                        ShellExecute(NULL, L"open", L"http://go.microsoft.com/fwlink/?linkid=56513", NULL, NULL, SW_SHOWNORMAL);
                return errmsg;
index 410e45ee179eeddf3250fcfe4bc482dbb56950fa..545d52262c58d02b816b9db41c78c229df2c2801 100644 (file)
@@ -1744,9 +1744,11 @@ int harddrive_to_hdf (HWND hDlg, struct uae_prefs *p, int idx)
                        SendMessage (hwndprogress, PBM_SETPOS, (WPARAM)pct, 0);
                        _stprintf (tmp, L"%dM / %dM (%d%%)", (int)(written >> 20), (int)(size >> 20), pct);
                        SendMessage (hwndprogresstxt, WM_SETTEXT, 0, (LPARAM)tmp);
-                       while (PeekMessage (&msg, 0, 0, 0, PM_REMOVE)) {
-                               TranslateMessage (&msg);
-                               DispatchMessage (&msg);
+                       while (PeekMessage (&msg, hwnd, 0, 0, PM_REMOVE)) {
+                               if (!IsDialogMessage (hwnd, &msg)) {
+                                       TranslateMessage (&msg);
+                                       DispatchMessage (&msg);
+                               }
                        }
                        cnt = 0;
                }
index 51560c3d7cbb9da4fb37ab08e6c66c85fd2fddc9..8cfdd2a59dd7b89ff817fe73f614014154249939 100644 (file)
 #define IDS_PRINTER_POSTSCRIPT_EMULATION 354
 #define IDD_INPUTMAP                    354
 #define IDS_PRINTER_PASSTHROUGH         355
+#define IDD_INFOBOX                     355
 #define IDS_RES_LORES                   356
 #define IDS_RES_HIRES                   357
 #define IDS_RES_SUPERHIRES              358
 #define IDC_MBRAM1                      1050
 #define IDC_MBRAM2                      1051
 #define IDC_Z3CHIPMEM                   1052
-#define IDC_Z3FASTRAM2                  1053
 #define IDC_Z3CHIPRAM                   1053
 #define IDC_UAEHOME                     1070
 #define IDC_PICASSOHOME                 1071
 #define IDC_PORT0_REMAP                 1799
 #define IDC_PORT2_REMAP                 1800
 #define IDC_PORT3_REMAP                 1801
-#define IDC_EDIT1                       1801
 #define IDC_INPUTMAPOUT                 1801
+#define IDC_INFOBOX_TEXT2               1802
+#define IDC_INFOBOX_TEXT1               1803
+#define IDC_INFOBOX_TEXT3               1804
 #define ID__FLOPPYDRIVES                40004
 #define ID_FLOPPYDRIVES_DF0             40005
 #define ID_ST_CONFIGURATION             40010
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_NO_MFC                     1
 #define _APS_3D_CONTROLS                     1
-#define _APS_NEXT_RESOURCE_VALUE        355
+#define _APS_NEXT_RESOURCE_VALUE        356
 #define _APS_NEXT_COMMAND_VALUE         40045
-#define _APS_NEXT_CONTROL_VALUE         1802
+#define _APS_NEXT_CONTROL_VALUE         1803
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif
index bd95b8953423e6f9c7e906388ea84084a16e8cb2..d790206cd70e9ed5fecad7b4e7510518a1bf9a40 100644 (file)
@@ -1032,6 +1032,18 @@ BEGIN
     EDITTEXT        IDC_INPUTMAPOUT,0,222,299,14,ES_AUTOHSCROLL | WS_DISABLED\r
 END\r
 \r
+IDD_INFOBOX DIALOGEX 0, 0, 420, 68\r
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU\r
+CAPTION "Scanning ROM image files..."\r
+FONT 8, "MS Sans Serif", 0, 0, 0x0\r
+BEGIN\r
+    DEFPUSHBUTTON   "OK",IDOK,123,50,50,14,NOT WS_VISIBLE\r
+    PUSHBUTTON      "Cancel",IDCANCEL,182,50,50,14\r
+    CTEXT           "",IDC_INFOBOX_TEXT2,6,21,412,11,SS_CENTERIMAGE | SS_SUNKEN | WS_TABSTOP\r
+    CTEXT           "",IDC_INFOBOX_TEXT1,6,7,412,11,SS_CENTERIMAGE | SS_SUNKEN | WS_TABSTOP\r
+    CTEXT           "",IDC_INFOBOX_TEXT3,5,35,412,11,SS_CENTERIMAGE | SS_SUNKEN | WS_TABSTOP\r
+END\r
+\r
 \r
 /////////////////////////////////////////////////////////////////////////////\r
 //\r
@@ -1249,6 +1261,10 @@ BEGIN
     BEGIN\r
     END\r
 \r
+    IDD_PROGRESSBAR, DIALOG\r
+    BEGIN\r
+    END\r
+\r
     IDD_STRINGBOX, DIALOG\r
     BEGIN\r
     END\r
@@ -1257,6 +1273,10 @@ BEGIN
     BEGIN\r
         TOPMARGIN, 1\r
     END\r
+\r
+    IDD_INFOBOX, DIALOG\r
+    BEGIN\r
+    END\r
 END\r
 #endif    // APSTUDIO_INVOKED\r
 \r
index 1b682aa3fbb32ec4b1a193dc3797f18169efe642..45c9c565e2991a665943e4952ce86e104ff225c7 100644 (file)
@@ -2916,7 +2916,7 @@ void fetch_path (TCHAR *name, TCHAR *out, int size)
        fixtrailing (out);
 }
 
-int get_rom_path(TCHAR *out, int mode)
+int get_rom_path (TCHAR *out, int mode)
 {
        TCHAR tmp[MAX_DPATH];
 
@@ -3050,7 +3050,7 @@ static void romlist_add2 (TCHAR *path, struct romdata *rd)
        romlist_add (path, rd);
 }
 
-extern int scan_roms (int);
+extern int scan_roms (HWND, int);
 void read_rom_list (void)
 {
        TCHAR tmp2[1000];
@@ -3066,7 +3066,7 @@ void read_rom_list (void)
                return;
        if (!exists || forceroms) {
                load_keyring (NULL, NULL);
-               scan_roms (forceroms ? 0 : 1);
+               scan_roms (NULL, forceroms ? 0 : 1);
        }
        forceroms = 0;
        idx = 0;
index fb2cb89d1ed83b286b1520b008b881bf44b7c4b8..b708e384cfd3f50cb1110924a66cada61b515627 100644 (file)
@@ -19,7 +19,7 @@
 #define LANG_DLL 1
 
 #define WINUAEBETA L"8"
-#define WINUAEDATE MAKEBD(2010, 6, 9)
+#define WINUAEDATE MAKEBD(2010, 6, 11)
 #define WINUAEEXTRA L""
 #define WINUAEREV L""
 
index 8468101485d054e76b958724f4d48cd4c679cc26..87124dde87f9363a9657f5b565d2565a44d1cacc 100644 (file)
@@ -2321,11 +2321,11 @@ static int create_windows_2 (void)
                SetCursorPos (x + w / 2, y + h / 2);
        addnotifications (hAmigaWnd, FALSE, FALSE);
        if (hMainWnd != hAmigaWnd) {
-               if (!currprefs.headless)
+               if (!currprefs.headless && !rp_isactive ())
                        ShowWindow (hMainWnd, firstwindow ? SW_SHOWDEFAULT : SW_SHOWNORMAL);
                UpdateWindow (hMainWnd);
        }
-       if (!currprefs.headless)
+       if (!currprefs.headless && !rp_isactive ())
                ShowWindow (hAmigaWnd, firstwindow ? SW_SHOWDEFAULT : SW_SHOWNORMAL);
        UpdateWindow (hAmigaWnd);
        firstwindow = 0;
index 2c7b0a89d11abe91c539e75c662496ce6c7c978f..fd8dc6308e91ee65d0aedfac9ea41f7000798fca 100644 (file)
@@ -1277,16 +1277,87 @@ static int isromext (TCHAR *path)
        return 0;
 }
 
+static bool infoboxdialogstate;
+static HWND infoboxhwnd;
+static INT_PTR CALLBACK InfoBoxDialogProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+       switch(msg)
+       {
+       case WM_DESTROY:
+               PostQuitMessage (0);
+               infoboxdialogstate = false;
+               return TRUE;
+       case WM_CLOSE:
+               DestroyWindow (hDlg);
+               infoboxdialogstate = false;
+       return TRUE;
+       case WM_INITDIALOG:
+       {
+               HWND owner = GetParent (hDlg);
+               if (!owner) {
+                       owner = GetDesktopWindow ();
+                       RECT ownerrc, merc;
+                       GetWindowRect (owner, &ownerrc);
+                       GetWindowRect (hDlg, &merc);
+                       SetWindowPos (hDlg, NULL,
+                               ownerrc.left + ((ownerrc.right - ownerrc.left) - (merc.right - merc.left)) /2,
+                               ownerrc.top + ((ownerrc.bottom - ownerrc.top) - (merc.bottom - merc.top)) / 2,
+                               0, 0,
+                               SWP_NOSIZE);
+               }
+               return TRUE;
+       }
+       case WM_COMMAND:
+               switch (LOWORD (wParam))
+               {
+               case IDCANCEL:
+                       infoboxdialogstate = false;
+                       DestroyWindow (hDlg);
+                       return TRUE;
+               }
+               break;
+       }
+       return FALSE;
+}
+static bool scan_rom_hook (const TCHAR *name, int line)
+{
+       MSG msg;
+       if (!infoboxhwnd)
+               return true;
+       if (name != NULL) {
+               const TCHAR *s = NULL;
+               if (line == 2) {
+                       s = _tcsrchr (name, '/');
+                       if (!s)
+                               s = _tcsrchr (name, '\\');
+                       if (s)
+                               s++;
+               }
+               SetWindowText (GetDlgItem (infoboxhwnd, line == 1 ? IDC_INFOBOX_TEXT1 : (line == 2 ? IDC_INFOBOX_TEXT2 : IDC_INFOBOX_TEXT3)), s ? s : name);
+       }
+       while (PeekMessage (&msg, infoboxhwnd, 0, 0, PM_REMOVE)) {
+               if (!IsDialogMessage (infoboxhwnd, &msg)) {
+                       TranslateMessage (&msg);
+                       DispatchMessage (&msg);
+               }
+       }
+       return infoboxdialogstate;
+}
+
 static int scan_rom_2 (struct zfile *f, void *vrsd)
 {
        struct romscandata *rsd = (struct romscandata*)vrsd;
        TCHAR *path = zfile_getname(f);
        struct romdata *rd;
 
-       if (!isromext(path))
+       scan_rom_hook (NULL, 0);
+       if (!isromext (path))
                return 0;
        rd = scan_single_rom_2 (f);
        if (rd) {
+               TCHAR name[MAX_DPATH];
+               getromname (rd, name);
+               scan_rom_hook (name, 3);
                addrom (rsd->fkey, rd, path);
                rsd->got = 1;
        }
@@ -1303,6 +1374,7 @@ static int scan_rom (TCHAR *path, UAEREG *fkey)
                //write_log("ROMSCAN: skipping file '%s', unknown extension\n", path);
                return 0;
        }
+       scan_rom_hook (path, 2);
        for (;;) {
                TCHAR tmp[MAX_DPATH];
                _tcscpy (tmp, path);
@@ -1411,6 +1483,7 @@ static int scan_roms_2 (UAEREG *fkey, TCHAR *path)
        handle = FindFirstFile (buf, &find_data);
        if (handle == INVALID_HANDLE_VALUE)
                return 0;
+       scan_rom_hook (path, 1);
        for (;;) {
                TCHAR tmppath[MAX_DPATH];
                _tcscpy (tmppath, path);
@@ -1419,7 +1492,7 @@ static int scan_roms_2 (UAEREG *fkey, TCHAR *path)
                        if (scan_rom (tmppath, fkey))
                                ret = 1;
                }
-               if (FindNextFile (handle, &find_data) == 0) {
+               if (!scan_rom_hook (NULL, 0) || FindNextFile (handle, &find_data) == 0) {
                        FindClose (handle);
                        break;
                }
@@ -1429,12 +1502,13 @@ static int scan_roms_2 (UAEREG *fkey, TCHAR *path)
 
 #define MAX_ROM_PATHS 10
 
-static int scan_roms_3(UAEREG *fkey, TCHAR **paths, TCHAR *path)
+static int scan_roms_3 (UAEREG *fkey, TCHAR **paths, TCHAR *path)
 {
        int i, ret;
        TCHAR pathp[MAX_DPATH];
 
        ret = 0;
+       scan_rom_hook (NULL, 0);
        GetFullPathName (path, MAX_DPATH, pathp, NULL);
        for (i = 0; i < MAX_ROM_PATHS; i++) {
                if (paths[i] && !_tcsicmp (paths[i], pathp))
@@ -1450,15 +1524,17 @@ static int scan_roms_3(UAEREG *fkey, TCHAR **paths, TCHAR *path)
        return ret;
 }
 
-extern int get_rom_path(TCHAR *out, int mode);
+extern int get_rom_path (TCHAR *out, int mode);
 
-int scan_roms (int show)
+int scan_roms (HWND hDlg, int show)
 {
        TCHAR path[MAX_DPATH];
        static int recursive;
        int id, i, ret, keys, cnt;
        UAEREG *fkey, *fkey2;
        TCHAR *paths[MAX_ROM_PATHS];
+       HWND hwnd = 0;
+       MSG msg;
 
        if (recursive)
                return 0;
@@ -1469,11 +1545,18 @@ int scan_roms (int show)
        if (fkey == NULL)
                goto end;
 
+       infoboxdialogstate = true;
+       hwnd = CreateDialog (hUIDLL ? hUIDLL : hInst, MAKEINTRESOURCE (IDD_INFOBOX), hDlg, InfoBoxDialogProc);
+       if (!hwnd)
+               goto end;
+       infoboxhwnd = hwnd;
+
        cnt = 0;
        ret = 0;
        for (i = 0; i < MAX_ROM_PATHS; i++)
                paths[i] = NULL;
-       for (;;) {
+       scan_rom_hook (NULL, 0);
+       while (scan_rom_hook (NULL, 0)) {
                keys = get_keyring ();
                fetch_path (L"KickstartPath", path, sizeof path / sizeof (TCHAR));
                cnt += scan_roms_3 (fkey, paths, path);
@@ -1516,6 +1599,14 @@ int scan_roms (int show)
        }
 
 end:
+       infoboxhwnd = NULL;
+       if (hwnd) {
+               DestroyWindow (hwnd);
+               while (PeekMessage (&msg, 0, 0, 0, PM_REMOVE)) {
+                       TranslateMessage (&msg);
+                       DispatchMessage (&msg);
+               }
+       }
        read_rom_list ();
        if (show)
                show_rom_list ();
@@ -4431,7 +4522,7 @@ static INT_PTR CALLBACK PathsDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM
                        if (DirectorySelection (hDlg, &pathsguid, tmp)) {
                                load_keyring (&workprefs, NULL);
                                set_path (L"KickstartPath", tmp);
-                               if (!scan_roms (1))
+                               if (!scan_roms (hDlg, 1))
                                        gui_message_id (IDS_ROMSCANNOROMS);
                                values_to_pathsdialog (hDlg);
                        }
@@ -4549,7 +4640,7 @@ static INT_PTR CALLBACK PathsDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM
                        }
                        break;
                case IDC_ROM_RESCAN:
-                       scan_roms (1);
+                       scan_roms (hDlg, 1);
                        break;
                case IDC_RESETREGISTRY:
                        resetregistry ();
@@ -6870,7 +6961,7 @@ static void init_kickstart (HWND hDlg)
        ew (hDlg, IDC_FLASHCHOOSER), FALSE);
 #endif
        if (!regexiststree (NULL , L"DetectedROMs"))
-               scan_roms (1);
+               scan_roms (NULL, 1);
 }
 
 static void kickstartfilebuttons (HWND hDlg, WPARAM wParam, TCHAR *path)
@@ -10844,7 +10935,7 @@ static int askinputcustom (HWND hDlg, TCHAR *custom, int maxlen, DWORD titleid)
        while (stringboxdialogactive == 1) {
                MSG msg;
                int ret;
-               WaitMessage();
+               WaitMessage ();
                while ((ret = GetMessage (&msg, NULL, 0, 0))) {
                        if (ret == -1)
                                break;
index 2996f976bdc1115cb034a255e1d6325e58023ce4..e3069f4b0ccea2589962bdac9422a58316302008 100644 (file)
@@ -357,13 +357,13 @@ static void romlist_cleanup (void)
                }
                if (ok == 0) {
                        while (i < j) {
-                               struct romlist *rl = romlist_getrl (&roms[i]);
-                               if (rl) {
-                                       int cnt = romlist_cnt - i - 1;
-                                       write_log (L"%s '%s' removed from romlist\n", roms[k].name, rl->path);
-                                       xfree (rl->path);
+                               struct romlist *rl2 = romlist_getrl (&roms[i]);
+                               if (rl2) {
+                                       int cnt = romlist_cnt - (rl2 - rl) - 1;
+                                       write_log (L"%s '%s' removed from romlist\n", roms[k].name, rl2->path);
+                                       xfree (rl2->path);
                                        if (cnt > 0)
-                                               memmove (rl, rl + 1, cnt * sizeof (struct romlist));
+                                               memmove (rl2, rl2 + 1, cnt * sizeof (struct romlist));
                                        romlist_cnt--;
                                }
                                i++;
index 3dab5fb8dbf0452a2ad19040c0b181d838e17798..8d33ab2e16838a5095ee866a85a5388fdc44cee4 100644 (file)
@@ -15,7 +15,7 @@ TCHAR start_path_data[MAX_DPATH];
 TCHAR sep[] = { FSDB_DIR_SEPARATOR, 0 };
 
 struct uae_prefs currprefs;
-static int debug = 1;
+static int debug = 0;
 static int amigatest;
 
 #define WRITE_LOG_BUF_SIZE 4096
@@ -698,7 +698,7 @@ int __cdecl wmain (int argc, wchar_t *argv[], wchar_t *envp[])
                ok = 1;
        }
        if (!ok) {
-               _tprintf (L"UAE unpacker uaeunp 0.8b by Toni Wilen (c)2010\n");
+               _tprintf (L"UAE unpacker uaeunp 0.8c by Toni Wilen (c)2010\n");
                _tprintf (L"\n");
                _tprintf (L"List: \"uaeunp (-l) <path>\"\n");
                _tprintf (L"List all recursively: \"uaeunp -l <path> **\"\n");
index 4569df211b3dd1d0ead81594e033c0ef6c2d4899..2d3f89142bf15ef288a3d94e9aec4c46cc6ba323 100644 (file)
--- a/zfile.cpp
+++ b/zfile.cpp
@@ -2584,7 +2584,6 @@ static struct zvolume *prepare_recursive_volume (struct zvolume *zv, const TCHAR
 {
        struct zfile *zf = NULL;
        struct zvolume *zvnew = NULL;
-//     int i;
        int done = 0;
 
 #ifdef ZFILE_DEBUG
@@ -2595,6 +2594,11 @@ static struct zvolume *prepare_recursive_volume (struct zvolume *zv, const TCHAR
                goto end;
        zvnew = zfile_fopen_archive_ext (zv->parentz, zf);
        if (!zvnew) {
+#if 1
+               zvnew = archive_directory_plain (zf);
+               zfile_fopen_archive_recurse (zvnew);
+               done = 1;
+#else
                int rc;
                int index;
                struct zfile *zf2, *zf3;
@@ -2615,12 +2619,13 @@ static struct zvolume *prepare_recursive_volume (struct zvolume *zv, const TCHAR
                                }
                        } else {
                                zfile_fclose (zf3);
-                               if (rc == 0)
+                               if (rc <= 0)
                                        break;
                        }
                        index++;
-                       break;
+                       break; // TODO
                }
+#endif
        } else {
                zvnew->parent = zv->parent;
                zfile_fopen_archive_recurse (zvnew);
index 97f646029cdde3bc946173e795f99087fd88f741..6a45aac6c667b4ccaabd1aeb0bce8bc924190e71 100644 (file)
@@ -1022,9 +1022,10 @@ struct zvolume *archive_directory_plain (struct zfile *z)
                        zai.size = zfile_ftell (zf2);
                        zfile_fseek (zf2, 0, SEEK_SET);
                        zn = zvolume_addfile_abs (zv, &zai);
-                       if (zn)
-                               zn->offset = index + 1;
-                       zfile_fclose (zf2);
+                       zn->f = zf2;
+//                     if (zn)
+//                             zn->offset = index + 1;
+//                     zfile_fclose (zf2);
                } else {
                        if (rc == 0) {
                                zfile_fclose (zf);