]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
imported winuaesrc1450b17.zip
authorToni Wilen <twilen@winuae.net>
Sat, 15 Dec 2007 14:42:19 +0000 (16:42 +0200)
committerToni Wilen <twilen@winuae.net>
Mon, 22 Feb 2010 19:37:33 +0000 (21:37 +0200)
include/zfile.h
od-win32/dinput.c
od-win32/win32.h
od-win32/win32gui.c
od-win32/winuaechangelog.txt
zfile.c
zfile_archive.c

index 5083370145a8de57a8ab3e04414409d190006273..b1a4c96085cc1d52b804319bc742457e8902d045 100644 (file)
@@ -38,6 +38,7 @@ extern uae_u32 zfile_crc32 (struct zfile *f);
 extern struct zfile *zfile_dup (struct zfile *f);
 extern struct zfile *zfile_gunzip (struct zfile *z);
 extern int zfile_isdiskimage (const char *name);
+extern int iszip (struct zfile *z);
 
 #define ZFILE_UNKNOWN 0
 #define ZFILE_CONFIGURATION 1
index eaa70295a93e62484c6ae2a7add280ffcc3b1985..07da46d69405664084d0215e34a80adefafa9c6b 100644 (file)
@@ -114,6 +114,15 @@ int dinput_winmousemode (void)
     return 0;
 }
 
+static isrealbutton (struct didata *did, int num)
+{
+    if (num >= did->buttons)
+       return 0;
+    if (did->axisparent[num] >= 0)
+       return 0;
+    return 1;
+}
+
 static void fixbuttons (struct didata *did)
 {
     if (did->buttons > 0)
@@ -1972,7 +1981,9 @@ int dinput_wmkey (uae_u32 key)
 
 int input_get_default_mouse (struct uae_input_device *uid, int i, int port)
 {
-    if (di_mouse[i].wininput)
+    struct didata *did = &di_mouse[i];
+
+    if (did->wininput)
        port = 0;
     uid[i].eventid[ID_AXIS_OFFSET + 0][0] = port ? INPUTEVENT_MOUSE2_HORIZ : INPUTEVENT_MOUSE1_HORIZ;
     uid[i].eventid[ID_AXIS_OFFSET + 1][0] = port ? INPUTEVENT_MOUSE2_VERT : INPUTEVENT_MOUSE1_VERT;
@@ -1981,10 +1992,14 @@ int input_get_default_mouse (struct uae_input_device *uid, int i, int port)
     uid[i].eventid[ID_BUTTON_OFFSET + 1][0] = port ? INPUTEVENT_JOY2_2ND_BUTTON : INPUTEVENT_JOY1_2ND_BUTTON;
     uid[i].eventid[ID_BUTTON_OFFSET + 2][0] = port ? INPUTEVENT_JOY2_3RD_BUTTON : INPUTEVENT_JOY1_3RD_BUTTON;
     if (port == 0) { /* map back and forward to ALT+LCUR and ALT+RCUR */
-       uid[i].eventid[ID_BUTTON_OFFSET + 3][0] = INPUTEVENT_KEY_ALT_LEFT;
-       uid[i].eventid[ID_BUTTON_OFFSET + 3][1] = INPUTEVENT_KEY_CURSOR_LEFT;
-       uid[i].eventid[ID_BUTTON_OFFSET + 4][0] = INPUTEVENT_KEY_ALT_LEFT;
-       uid[i].eventid[ID_BUTTON_OFFSET + 4][1] = INPUTEVENT_KEY_CURSOR_RIGHT;
+       if (isrealbutton (did, 3)) {
+           uid[i].eventid[ID_BUTTON_OFFSET + 3][0] = INPUTEVENT_KEY_ALT_LEFT;
+           uid[i].eventid[ID_BUTTON_OFFSET + 3][1] = INPUTEVENT_KEY_CURSOR_LEFT;
+           if (isrealbutton (did, 4)) {
+               uid[i].eventid[ID_BUTTON_OFFSET + 4][0] = INPUTEVENT_KEY_ALT_LEFT;
+               uid[i].eventid[ID_BUTTON_OFFSET + 4][1] = INPUTEVENT_KEY_CURSOR_RIGHT;
+           }
+       }
     }
     if (i == 0)
        return 1;
@@ -1999,8 +2014,10 @@ int input_get_default_joystick (struct uae_input_device *uid, int i, int port)
     uid[i].eventid[ID_AXIS_OFFSET + 0][0] = port ? INPUTEVENT_JOY2_HORIZ : INPUTEVENT_JOY1_HORIZ;
     uid[i].eventid[ID_AXIS_OFFSET + 1][0] = port ? INPUTEVENT_JOY2_VERT : INPUTEVENT_JOY1_VERT;
     uid[i].eventid[ID_BUTTON_OFFSET + 0][0] = port ? INPUTEVENT_JOY2_FIRE_BUTTON : INPUTEVENT_JOY1_FIRE_BUTTON;
-    uid[i].eventid[ID_BUTTON_OFFSET + 1][0] = port ? INPUTEVENT_JOY2_2ND_BUTTON : INPUTEVENT_JOY1_2ND_BUTTON;
-    uid[i].eventid[ID_BUTTON_OFFSET + 2][0] = port ? INPUTEVENT_JOY2_3RD_BUTTON : INPUTEVENT_JOY1_3RD_BUTTON;
+    if (isrealbutton (did, 1))
+       uid[i].eventid[ID_BUTTON_OFFSET + 1][0] = port ? INPUTEVENT_JOY2_2ND_BUTTON : INPUTEVENT_JOY1_2ND_BUTTON;
+    if (isrealbutton (did, 2))
+       uid[i].eventid[ID_BUTTON_OFFSET + 2][0] = port ? INPUTEVENT_JOY2_3RD_BUTTON : INPUTEVENT_JOY1_3RD_BUTTON;
     for (j = 2; j < MAX_MAPPINGS - 1; j++) {
        int am = did->axismappings[j];
        if (am == DIJOFS_POV(0) || am == DIJOFS_POV(1) || am == DIJOFS_POV(2) || am == DIJOFS_POV(3)) {
@@ -2011,12 +2028,18 @@ int input_get_default_joystick (struct uae_input_device *uid, int i, int port)
     }
     if (currprefs.cs_cd32cd) {
        uid[i].eventid[ID_BUTTON_OFFSET + 0][0] = port ? INPUTEVENT_JOY2_CD32_RED : INPUTEVENT_JOY1_CD32_RED;
-       uid[i].eventid[ID_BUTTON_OFFSET + 1][0] = port ? INPUTEVENT_JOY2_CD32_BLUE : INPUTEVENT_JOY1_CD32_BLUE;
-       uid[i].eventid[ID_BUTTON_OFFSET + 2][0] = port ? INPUTEVENT_JOY2_CD32_YELLOW : INPUTEVENT_JOY1_CD32_YELLOW;
-       uid[i].eventid[ID_BUTTON_OFFSET + 3][0] = port ? INPUTEVENT_JOY2_CD32_GREEN : INPUTEVENT_JOY1_CD32_GREEN;
-       uid[i].eventid[ID_BUTTON_OFFSET + 4][0] = port ? INPUTEVENT_JOY2_CD32_FFW : INPUTEVENT_JOY1_CD32_FFW;
-       uid[i].eventid[ID_BUTTON_OFFSET + 5][0] = port ? INPUTEVENT_JOY2_CD32_RWD : INPUTEVENT_JOY1_CD32_RWD;
-       uid[i].eventid[ID_BUTTON_OFFSET + 6][0] = port ? INPUTEVENT_JOY2_CD32_PLAY :  INPUTEVENT_JOY1_CD32_PLAY;
+       if (isrealbutton (did, 1))
+           uid[i].eventid[ID_BUTTON_OFFSET + 1][0] = port ? INPUTEVENT_JOY2_CD32_BLUE : INPUTEVENT_JOY1_CD32_BLUE;
+       if (isrealbutton (did, 2))
+           uid[i].eventid[ID_BUTTON_OFFSET + 2][0] = port ? INPUTEVENT_JOY2_CD32_YELLOW : INPUTEVENT_JOY1_CD32_YELLOW;
+       if (isrealbutton (did, 3))
+           uid[i].eventid[ID_BUTTON_OFFSET + 3][0] = port ? INPUTEVENT_JOY2_CD32_GREEN : INPUTEVENT_JOY1_CD32_GREEN;
+       if (isrealbutton (did, 4))
+           uid[i].eventid[ID_BUTTON_OFFSET + 4][0] = port ? INPUTEVENT_JOY2_CD32_FFW : INPUTEVENT_JOY1_CD32_FFW;
+       if (isrealbutton (did, 5))
+           uid[i].eventid[ID_BUTTON_OFFSET + 5][0] = port ? INPUTEVENT_JOY2_CD32_RWD : INPUTEVENT_JOY1_CD32_RWD;
+       if (isrealbutton (did, 6))
+           uid[i].eventid[ID_BUTTON_OFFSET + 6][0] = port ? INPUTEVENT_JOY2_CD32_PLAY :  INPUTEVENT_JOY1_CD32_PLAY;
     }
     if (i == 0)
        return 1;
index f9547582596a5f58f2197adb06948c89117c7786..0ac6f8f043b61d726bf8b7e8122650c7dd13941b 100644 (file)
@@ -15,9 +15,9 @@
 #define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
 #define GETBDD(x) ((x) % 100)
 
-#define WINUAEBETA 16
+#define WINUAEBETA 17
 #define WINUAEPUBLICBETA 1
-#define WINUAEDATE MAKEBD(2007, 12, 12)
+#define WINUAEDATE MAKEBD(2007, 12, 15)
 #define WINUAEEXTRA ""
 #define WINUAEREV ""
 
index eb57354a282dcac14910156442bd26f82c9dbc5e..7455ee2f3ed655ad8cca8beb8cab8ad7d886ca87 100644 (file)
@@ -690,21 +690,24 @@ int scan_roms (int show)
        goto end;
 
     cnt = 0;
+    ret = 0;
     for (i = 0; i < 10; i++)
        paths[i] = NULL;
     for (;;) {
        keys = get_keyring();
-       fetch_path("KickstartPath", path, sizeof path);
+       fetch_path ("KickstartPath", path, sizeof path);
        scan_roms_3 (fkey, paths, 0, path);
-       for(i = 0; ;i++) {
-           ret = get_rom_path(path, i);
-           if (ret < 0)
-               break;
-           cnt += scan_roms_3 (fkey, paths, 2 + i, path);
-       }
-       if (get_keyring() > keys) { /* more keys detected in previous scan? */
-           keys = get_keyring();
-           continue;
+       if (1) {
+           for(i = 0; ;i++) {
+               ret = get_rom_path (path, i);
+               if (ret < 0)
+                   break;
+               cnt += scan_roms_3 (fkey, paths, 2 + i, path);
+           }
+           if (get_keyring() > keys) { /* more keys detected in previous scan? */
+               keys = get_keyring();
+               continue;
+           }
        }
        break;
     }
index 9dc06e9c299be7058ce50b3b97916685cdafe2af..3722c9821278e44c0dc48d6f9a7c005ea904a03d 100644 (file)
@@ -1,3 +1,26 @@
+
+
+Dabei seit: 09.09.2005 15:28 It since: 09.09.2005 15:28 
+Herkunft: Rheinland-Pfalz Source: Rhineland-Palatinate 
+Beiträge: 81 Posts: 81 
+
+        Hallo Leute im Amigaemuboard! Hi people in Amigaemuboard! 
+
+Wie kann ich eigentlich im WinUAE den Schreibschutz für Amiga-Games deaktivieren? How can I actually WinUAE in the write protection for Amiga Games deactivate? 
+Muß den nicht bei einigen Amigaspielen die als ADF-Format vorliegen der Schreibschutz Do not some Amiga games as ADF-Format present the write protection 
+deaktiviert wwerden, um sie lauffähig machen zu können??? Disabled wwerden order to be able to run? Wie kann man den Schreibschutz How can you write protection 
+einer Diskette (ADF) deaktivieren? A diskette (ADF) disable? 
+
+MfG Micro Micro MfG  
+Beta 17:
+
+- roms inside archive directory failed to load
+- check that mouse buttons #4 and #5 are real buttons (not "Wheel -/+")
+  before adding default Left ALT + Cursor Left/Right mappings
 
 Beta 16:
 
@@ -12,6 +35,7 @@ Beta 16:
   settings (previously 256k = 0xF0, 512k = 0xE0)
 - Direct3D CreateTexture() return code was ignored, crashed if texture
   creation failed for some reason (out of video memory?)
+- misc tweaks
 
 Beta 15:
 
diff --git a/zfile.c b/zfile.c
index d6f54899e0d24d7f69798ab6b6365db7e5ff2bd6..2c242f533ba4dd4dbac669f8918d859c1d6fb58e 100644 (file)
--- a/zfile.c
+++ b/zfile.c
@@ -310,7 +310,7 @@ static const char *plugins_7z[] = { "7z", "rar", "zip", "lha", "lzh", "lzx", NUL
 static const char *plugins_7z_x[] = { "7z", "Rar!", "MK", NULL, NULL, NULL, NULL };
 static const int plugins_7z_t[] = { ArchiveFormat7Zip, ArchiveFormatRAR, ArchiveFormatZIP, ArchiveFormatLHA, ArchiveFormatLHA, ArchiveFormatLZX };
 
-static int iszip (struct zfile *z)
+int iszip (struct zfile *z)
 {
     char *name = z->name;
     char *ext = strrchr (name, '.');
index f3e1e9d98980d9548a9e3217bc678d7f6c6f8f57..5a0ac44b6718b06056908a1fb4489b0369219d85 100644 (file)
@@ -141,7 +141,7 @@ struct zfile *archive_access_select (struct zfile *zf, unsigned int id, int dode
            select = 0;
            if (!zf->zipname)
                select = 1;
-           if (zf->zipname && !strcasecmp (zf->zipname, zn->name))
+           if (zf->zipname && strlen (zn->fullname) >= strlen (zf->zipname) && !strcasecmp (zf->zipname, zn->fullname + strlen (zn->fullname) - strlen (zf->zipname)))
                select = -1;
            if (zf->zipname && zf->zipname[0] == '#' && atol (zf->zipname + 1) == zipcnt)
                select = -1;
@@ -191,10 +191,15 @@ void archive_access_scan (struct zfile *zf, zfile_callback zc, void *user, unsig
        if (zn->isfile) {
            struct zfile *zf2 = archive_getzfile (zn, id);
            if (zf2) {
-               int ret = zc (zf2, user);
-               zfile_fclose(zf2);
-               if (ret)
-                   break;
+               int ztype = iszip (zf2);
+               if (ztype) {
+                   zfile_fclose (zf2);
+               } else {
+                   int ret = zc (zf2, user);
+                   zfile_fclose(zf2);
+                   if (ret)
+                       break;
+               }
            }
        }
        zn = zn->next;