]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
imported winuaesrc0990rc1.zip
authorToni Wilen <twilen@winuae.net>
Sun, 25 Jul 2004 16:07:47 +0000 (19:07 +0300)
committerToni Wilen <twilen@winuae.net>
Mon, 22 Feb 2010 19:24:06 +0000 (21:24 +0200)
blitter.c
cfgfile.c
memory.c
od-win32/dinput.c
od-win32/resources/resource.h
od-win32/resources/winuae.rc
od-win32/sounddep/sound.c
od-win32/win32.h
od-win32/win32gui.c

index d6b48541e37bd3f359673733ae4d7469e71ce84e..373c9b8f2be59f9e5a6bfcd8bc0d05b8e769a886 100755 (executable)
--- a/blitter.c
+++ b/blitter.c
@@ -999,6 +999,8 @@ void blitter_slowdown (int ddfstrt, int ddfstop, int totalcycles, int freecycles
     static int oddfstrt, oddfstop, ototal, ofree;
     static int slow;
     
+    if (!totalcycles)
+       return;
     if (ddfstrt != oddfstrt || ddfstop != oddfstop || totalcycles != ototal || ofree != freecycles) {
        int linecycles = ((ddfstop - ddfstrt + totalcycles - 1) / totalcycles) * totalcycles;
        int freelinecycles = ((ddfstop - ddfstrt + totalcycles - 1) / totalcycles) * freecycles;
index 923b7213b272988fadefc02e48a475a7a8f46a7a..ec7c8251e5d34cdd696d0991dd2c2a1e6260109a 100755 (executable)
--- a/cfgfile.c
+++ b/cfgfile.c
@@ -290,12 +290,15 @@ void save_options (FILE *f, struct uae_prefs *p, int type)
     for (i = 0; i < 2; i++) {
        int v = i == 0 ? p->jport0 : p->jport1;
         char tmp1[100], tmp2[50];
-        if (v < JSEM_JOYS)
+        if (v < JSEM_JOYS) {
            sprintf (tmp2, "kbd%d", v + 1);
-       else if (v < JSEM_MICE)
-           sprintf (tmp2, "joy%d", v - JSEM_JOYS + 1);
-       else
-           sprintf (tmp2, "mouse%d", v - JSEM_MICE + 1);
+       } else if (v < JSEM_MICE) {
+           sprintf (tmp2, "joy%d", v - JSEM_JOYS);
+       } else {
+           strcpy (tmp2, "mouse");
+           if (v - JSEM_MICE > 0)
+               sprintf (tmp2, "mouse%d", v - JSEM_MICE);
+       }
        sprintf (tmp1, "joyport%d=%s\n", i, tmp2);
        cfgfile_write (f, tmp1);
     }
@@ -730,13 +733,16 @@ static int cfgfile_parse_host (struct uae_prefs *p, char *option, char *value)
        }
        if (pp) {
            int v = atol (pp);
-           if (start >= 0 && v > 0) {
-               v--;
-               start += v;
-               if (port)
-                   p->jport1 = start;
-               else
-                   p->jport0 = start;
+           if (start >= 0) {
+               if (start == JSEM_KBDLAYOUT)
+                   v--;
+               if (v >= 0) {
+                   start += v;
+                   if (port)
+                       p->jport1 = start;
+                   else
+                       p->jport0 = start;
+               }
            }
        }
        return 1;
index 15d6d1ae8fada1bfd847eec317830b257f7aca99..5c14fb9854bfb668f754ffd18c22fa29b5cc18d8 100755 (executable)
--- a/memory.c
+++ b/memory.c
@@ -373,7 +373,7 @@ uae_u32 REGPARAM2 dummy_lget (uaecptr addr)
     if (currprefs.illegal_mem) {
        if (illegal_count < MAX_ILG) {
            illegal_count++;
-           write_log ("Illegal lget at %08lx\n", addr);
+           write_log ("Illegal lget at %08lx PC=%x\n", addr, m68k_getpc());
        }
     }
     if (currprefs.cpu_level >= 2)
@@ -389,7 +389,7 @@ uae_u32 REGPARAM2 dummy_wget (uaecptr addr)
     if (currprefs.illegal_mem) {
        if (illegal_count < MAX_ILG) {
            illegal_count++;
-           write_log ("Illegal wget at %08lx\n", addr);
+           write_log ("Illegal wget at %08lx PC=%x\n", addr, m68k_getpc());
        }
     }
     if (currprefs.cpu_level >= 2)
@@ -405,7 +405,7 @@ uae_u32 REGPARAM2 dummy_bget (uaecptr addr)
     if (currprefs.illegal_mem) {
        if (illegal_count < MAX_ILG) {
            illegal_count++;
-           write_log ("Illegal bget at %08lx\n", addr);
+           write_log ("Illegal bget at %08lx PC=%x\n", addr, m68k_getpc());
        }
     }
     if (currprefs.cpu_level >= 2)
@@ -421,7 +421,7 @@ void REGPARAM2 dummy_lput (uaecptr addr, uae_u32 l)
    if (currprefs.illegal_mem) {
        if (illegal_count < MAX_ILG) {
            illegal_count++;
-           write_log ("Illegal lput at %08lx\n", addr);
+           write_log ("Illegal lput at %08lx PC=%x\n", addr, m68k_getpc());
        }
     }
 }
@@ -433,7 +433,7 @@ void REGPARAM2 dummy_wput (uaecptr addr, uae_u32 w)
     if (currprefs.illegal_mem) {
        if (illegal_count < MAX_ILG) {
            illegal_count++;
-           write_log ("Illegal wput at %08lx\n", addr);
+           write_log ("Illegal wput at %08lx PC=%x\n", addr, m68k_getpc());
        }
     }
 }
@@ -445,7 +445,7 @@ void REGPARAM2 dummy_bput (uaecptr addr, uae_u32 b)
     if (currprefs.illegal_mem) {
        if (illegal_count < MAX_ILG) {
            illegal_count++;
-           write_log ("Illegal bput at %08lx\n", addr);
+           write_log ("Illegal bput at %08lx PC=%x\n", addr, m68k_getpc());
        }
     }
 }
@@ -458,7 +458,7 @@ int REGPARAM2 dummy_check (uaecptr addr, uae_u32 size)
     if (currprefs.illegal_mem) {
        if (illegal_count < MAX_ILG) {
            illegal_count++;
-           write_log ("Illegal check at %08lx\n", addr);
+           write_log ("Illegal check at %08lx PC=%x\n", addr, m68k_getpc());
        }
     }
 
index 950a17b40cb05c4b7940c86aa750f7f8bd73be72..9861b3773112919bc231701f27eb9a80822faeaf 100755 (executable)
@@ -1258,7 +1258,7 @@ static int keyhack (int scancode,int pressed, int num)
        return -1;
     }
 
-    if (!keyboard_german)
+    if (!keyboard_german || currprefs.input_selected_setting > 0)
        return scancode;
  
  //This code look so ugly because there is no Directinput
@@ -1477,10 +1477,12 @@ static void unacquire_kb (int num)
     }
     release_keys ();
 
-    if (currprefs.keyboard_leds_in_use && oldusedleds >= 0) {
-       if (!usbledmode)
-           set_leds (oldleds);
-       oldusedleds = oldleds;
+    if (currprefs.keyboard_leds_in_use) {
+       if (oldusedleds >= 0) {
+           if (!usbledmode)
+               set_leds (oldleds);
+           oldusedleds = oldleds;
+       }
 #ifdef WINDDK
        if (kbhandle != INVALID_HANDLE_VALUE) {
            CloseHandle(kbhandle);
@@ -1557,18 +1559,6 @@ static void read_joystick (void)
        if (currprefs.input_selected_setting == 0) {
            if (jsem_isjoy (0, &currprefs) != i && jsem_isjoy (1, &currprefs) != i)
                continue;
-#if 0
-           if (i >= 2)
-               break;
-           if (isjoy (i, 0)) {
-               if (JSEM_ISNUMPAD (0, &currprefs) || JSEM_ISCURSOR (0, &currprefs) || JSEM_ISSOMEWHEREELSE (0, &currprefs))
-                   continue;
-           } else if (isjoy (i, 1)) {
-               if (JSEM_ISNUMPAD (1, &currprefs) || JSEM_ISCURSOR (1, &currprefs) || JSEM_ISSOMEWHEREELSE (1, &currprefs))
-                   continue;
-           } else
-               continue;
-#endif
        }
        elements = DI_BUFFER;
        hr = IDirectInputDevice8_GetDeviceData (lpdi, sizeof (DIDEVICEOBJECTDATA), didod, &elements, 0);
index a6887a172c96530a4d1fdf744ba4931bb67126bd..0a1491f4eded89ec267f598b776400fe3cd34dda 100755 (executable)
 #define IDC_CLOANTOHOME                 1075
 #define IDC_THEROOTS                    1076
 #define IDC_CAPS                        1077
+#define IDC_ABIME                       1078
 #define IDC_RICHEDIT1                   1091
 #define IDC_RICHEDIT2                   1092
 #define IDC_CONTRIBUTORS                1124
 #define IDC_DF1Q                        1679
 #define IDC_QUICKSTART_HOSTCONFIG       1679
 #define IDC_DF1QQ                       1680
-#define IDC_DF1QQ2                      1681
 #define IDC_QUICKSTART_SETCONFIG        1681
 #define IDC_CONFIGAUTO                  1682
 #define IDC_DF0TEXTQ                    1683
index eb81970d246361f75cc711770137582e2898fcd1..1d4ff62ca367b77235f014ee18d224992826ce70 100755 (executable)
@@ -495,11 +495,14 @@ BEGIN
                     TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,110,120,
                     80,15
     CONTROL         "",IDC_THEROOTS,"RICHEDIT",TCS_SCROLLOPPOSITE | 
-                    TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,33,143,
-                    110,15
+                    TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,20,145,
+                    80,15
     CONTROL         "",IDC_CAPS,"RICHEDIT",TCS_SCROLLOPPOSITE | 
-                    TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,150,143,
-                    110,15
+                    TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,200,145,
+                    80,15
+    CONTROL         "",IDC_ABIME,"RICHEDIT",TCS_SCROLLOPPOSITE | 
+                    TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,110,145,
+                    80,15
 END
 
 IDD_MISC1 DIALOGEX 0, 0, 300, 223
index 6d56809f128870899ad0aadd2eae1ecdda22ec33..833fa9e54c48bcd75f86574319935eda99104604 100755 (executable)
@@ -322,6 +322,7 @@ static int open_audio_ds (int size)
     wavfmt.wBitsPerSample = 16;
     wavfmt.nBlockAlign = 16 / 8 * wavfmt.nChannels;
     wavfmt.nAvgBytesPerSec = wavfmt.nBlockAlign * freq;
+    wavfmt.cbSize = 0;
 
     max_sndbufsize = size * 3;
     if (max_sndbufsize > SND_MAX_BUFFER2)
index d203e6753397bf81555daa07bce3ef24a81c901e..e62410bce596cb037cc915d7b309ae258c79b451 100755 (executable)
@@ -21,7 +21,7 @@ extern int manual_painting_needed;
 extern int manual_palette_refresh_needed;
 extern int mouseactive, focus;
 #define WINUAEBETA 1
-#define WINUAEBETASTR " Beta 13"
+#define WINUAEBETASTR " RC1"
 
 extern void my_kbd_handler (int, int, int);
 extern void clearallkeys(void);
index 81a6c720496c0669483a8cc33465d7731fe19641..526b0c47a55114ded86ab9a6011679fafdb7a2d2 100755 (executable)
@@ -2152,7 +2152,6 @@ static void DisplayContributors (HWND hDlg)
     DialogBox( hUIDLL ? hUIDLL : hInst, MAKEINTRESOURCE (IDD_CONTRIBUTORS), hDlg, ContributorsProc);
 }
 
-#define NUM_URLS 8
 typedef struct url_info
 {
     int   id;
@@ -2161,7 +2160,7 @@ typedef struct url_info
     char *url;
 } urlinfo;
 
-static urlinfo urls[NUM_URLS] = 
+static urlinfo urls[] = 
 {
     {IDC_CLOANTOHOME, FALSE, "Cloanto's Amiga Forever", "http://www.amigaforever.com/"},
     {IDC_AMIGAHOME, FALSE, "Amiga Inc.", "http://www.amiga.com"},
@@ -2169,8 +2168,10 @@ static urlinfo urls[NUM_URLS] =
     {IDC_UAEHOME, FALSE, "UAE Home Page", "http://www.freiburg.linux.de/~uae/"},
     {IDC_WINUAEHOME, FALSE, "WinUAE Home Page", "http://www.winuae.net/"},
     {IDC_AIABHOME, FALSE, "AIAB", "http://aiab.emuunlim.com/"},
-    {IDC_THEROOTS, FALSE, "Back To The Roots", "http://back2roots.emuunlim.com/"},
-    {IDC_CAPS, FALSE, "CAPS", "http://caps-project.org/"}
+    {IDC_THEROOTS, FALSE, "Back To The Roots", "http://www.back2roots.org/"},
+    {IDC_ABIME, FALSE, "abime.net", "http://www.abime.net/"},
+    {IDC_CAPS, FALSE, "CAPS", "http://caps-project.org/"},
+    { -1, FALSE, NULL, NULL }
 };
 
 static void SetupRichText( HWND hDlg, urlinfo *url )
@@ -2200,7 +2201,7 @@ static void url_handler(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam )
     point.x = LOWORD (lParam);
     point.y = HIWORD (lParam);
     
-    for (i = 0; i < NUM_URLS; i++) 
+    for (i = 0; urls[i].id >= 0; i++) 
     {
        RECT rect;
        GetWindowRect( GetDlgItem( hDlg, urls[i].id), &rect );
@@ -2417,7 +2418,7 @@ static struct amigamodels amodels[] = {
     { 4, IDS_QS_MODEL_A500P }, // "Amiga 500+"
     { 4, IDS_QS_MODEL_A600 }, // "Amiga 600"
     { 4, IDS_QS_MODEL_A1000 }, // "Amiga 1000"
-    { 3, IDS_QS_MODEL_A1200 }, // "Amiga 1200"
+    { 3, IDS_QS_MODEL_A1200 }, // "Amiga 1200"
     { 3, IDS_QS_MODEL_CD32 }, // "CD32"
     { 4, IDS_QS_MODEL_CDTV }, // "CDTV"
     { 0, 0 },
@@ -2825,7 +2826,7 @@ static void init_aboutdlg (HWND hDlg)
     SendDlgItemMessage (hDlg, IDC_RICHEDIT2, EM_SETCHARFORMAT, SCF_ALL, (LPARAM) & CharFormat);
     SendDlgItemMessage (hDlg, IDC_RICHEDIT2, EM_SETBKGNDCOLOR, 0, GetSysColor (COLOR_3DFACE));
 
-    for( i = 0; i < NUM_URLS; i++ )
+    for( i = 0; urls[i].id >= 0; i++ )
     {
         SetupRichText( hDlg, &urls[i] );
     }
@@ -5900,10 +5901,17 @@ static void updatejoyport (HWND hDlg)
            SendDlgItemMessage (hDlg, id1, CB_ADDSTRING, 0, (LPARAM)inputdevice_get_device_name(IDTYPE_JOYSTICK, j));
         for (j = 0; j < inputdevice_get_device_total (IDTYPE_MOUSE); j++, total++)
            SendDlgItemMessage (hDlg, id1, CB_ADDSTRING, 0, (LPARAM)inputdevice_get_device_name(IDTYPE_MOUSE, j));
-       if (v >= JSEM_MICE)
-           idx = inputdevice_get_device_total (IDTYPE_JOYSTICK) + (v - JSEM_MICE) + 1;
-       else if (v >= JSEM_JOYS)
+       if (v >= JSEM_MICE) {
+           idx = (v - JSEM_MICE) + 1;
+           if (idx > inputdevice_get_device_total (IDTYPE_MOUSE))
+               idx = 0;
+           else
+               idx += inputdevice_get_device_total (IDTYPE_JOYSTICK);
+       }else if (v >= JSEM_JOYS) {
            idx = v - JSEM_JOYS + 1;
+           if (idx > inputdevice_get_device_total (IDTYPE_JOYSTICK))
+               idx = 0;
+       }
        if (idx >= total)
            idx = 0;
        SendDlgItemMessage (hDlg, id1, CB_SETCURSEL, idx, 0);