From 62a33871c931c4dad1fbaabbf7e4ef050e3bb770 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 15 Dec 2007 16:42:19 +0200 Subject: [PATCH] imported winuaesrc1450b17.zip --- include/zfile.h | 1 + od-win32/dinput.c | 49 ++++++++++++++++++++++++++---------- od-win32/win32.h | 4 +-- od-win32/win32gui.c | 23 +++++++++-------- od-win32/winuaechangelog.txt | 24 ++++++++++++++++++ zfile.c | 2 +- zfile_archive.c | 15 +++++++---- 7 files changed, 87 insertions(+), 31 deletions(-) diff --git a/include/zfile.h b/include/zfile.h index 50833701..b1a4c960 100644 --- a/include/zfile.h +++ b/include/zfile.h @@ -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 diff --git a/od-win32/dinput.c b/od-win32/dinput.c index eaa70295..07da46d6 100644 --- a/od-win32/dinput.c +++ b/od-win32/dinput.c @@ -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; diff --git a/od-win32/win32.h b/od-win32/win32.h index f9547582..0ac6f8f0 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -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 "" diff --git a/od-win32/win32gui.c b/od-win32/win32gui.c index eb57354a..7455ee2f 100644 --- a/od-win32/win32gui.c +++ b/od-win32/win32gui.c @@ -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; } diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 9dc06e9c..3722c982 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -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 d6f54899..2c242f53 100644 --- 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, '.'); diff --git a/zfile_archive.c b/zfile_archive.c index f3e1e9d9..5a0ac44b 100644 --- a/zfile_archive.c +++ b/zfile_archive.c @@ -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; -- 2.47.3