]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
imported winuaesrc0990b3.zip
authorToni Wilen <twilen@winuae.net>
Tue, 15 Jun 2004 17:05:59 +0000 (20:05 +0300)
committerToni Wilen <twilen@winuae.net>
Mon, 22 Feb 2010 19:23:24 +0000 (21:23 +0200)
cfgfile.c
debug.c
include/options.h
main.c
od-win32/avioutput.c
od-win32/resources/resource.h
od-win32/resources/winuae.rc
od-win32/win32.c
od-win32/win32.h
od-win32/win32gui.c

index b80ee748eb1d4bd38aa7cd9700d525c30bed38ca..918df07ed4488dee3056590fb2bd438eb70f0bf5 100755 (executable)
--- a/cfgfile.c
+++ b/cfgfile.c
@@ -1259,8 +1259,13 @@ static int cfgfile_load_2 (struct uae_prefs *p, const char *filename, int real,
 
 int cfgfile_load (struct uae_prefs *p, const char *filename, int *type)
 {
-    write_log ("load config '%s'\n", filename);
-    return cfgfile_load_2 (p, filename, 1, type);
+    int v;
+
+    write_log ("load config '%s':%d\n", filename, type ? *type : -1);
+    v = cfgfile_load_2 (p, filename, 1, type);
+    if (!v)
+       write_log ("load failed\n");
+    return v;
 }
 
 int cfgfile_save (struct uae_prefs *p, const char *filename, int type)
@@ -1789,16 +1794,16 @@ void default_prefs (struct uae_prefs *p, int type)
     p->parallel_demand = 0;
 
     p->jport0 = 2;
-    p->jport1 = 0;
+    p->jport1 = 4;
     p->keyboard_lang = KBD_LANG_US;
 
     p->produce_sound = 3;
-    p->stereo = 0;
+    p->stereo = 1;
     p->sound_bits = DEFAULT_SOUND_BITS;
     p->sound_freq = DEFAULT_SOUND_FREQ;
     p->sound_maxbsiz = DEFAULT_SOUND_MAXB;
     p->sound_interpol = 0;
-    p->sound_filter = 0;
+    p->sound_filter = 1;
 
     p->comptrustbyte = 0;
     p->comptrustword = 0;
@@ -1956,6 +1961,8 @@ static void buildin_default_prefs (struct uae_prefs *p)
     p->catweasel_io = 0;
     p->tod_hack = 0;
     p->maprom = 0;
+    p->sound_filter = 1;
+    p->stereo = 1;
 
     p->chipmem_size = 0x00080000;
     p->bogomem_size = 0x00080000;
@@ -2008,6 +2015,7 @@ static int bip_a1000 (struct uae_prefs *p, int config, int compa, int romcheck)
     rom[2] = -1;
     p->chipset_mask = 0;
     p->bogomem_size = 0;
+    p->sound_filter = 2;
     if (config == 1)
        p->chipmem_size = 0x40000;
     set_68000_compa (p, compa);
diff --git a/debug.c b/debug.c
index ec4571b9a6cc3eff40be2fa662c77edfd05efaa3..4a00d83dcbb4db71a49d4fd088f374dafa7547bb 100755 (executable)
--- a/debug.c
+++ b/debug.c
@@ -961,7 +961,7 @@ static int instruction_breakpoint (char **c)
            do_skip = 1;
            skipaddr_doskip = 1;
            return 1;
-       } else if (nc == 'D') {
+       } else if (nc == 'D' && (*c)[1] == 0) {
            for (i = 0; i < BREAKPOINT_TOTAL; i++)
                bpnodes[i].enabled = 0;
            console_out ("All breakpoints removed\n");
index 20ada3f3ad279b6ca702d6140dbd633c1d3dfede..d5e7ab6f01d6ecdbca68d249ca5cb55bb7322831 100755 (executable)
@@ -247,6 +247,7 @@ extern char *cfgfile_subst_path (const char *path, const char *subst, const char
 extern int target_parse_option (struct uae_prefs *, char *option, char *value);
 extern void target_save_options (FILE *, struct uae_prefs *);
 extern void target_default_options (struct uae_prefs *);
+extern int target_cfgfile_load (struct uae_prefs *, char *filename, int type);
 
 extern int cfgfile_load (struct uae_prefs *, const char *filename, int *);
 extern int cfgfile_save (struct uae_prefs *, const char *filename, int);
diff --git a/main.c b/main.c
index a2b9fed1ca7abb1a6206ddffa93fd829f64dc9b0..f47a0ab1502365d3765cb7ddcd0f6c2a9391687d 100755 (executable)
--- a/main.c
+++ b/main.c
@@ -385,11 +385,7 @@ static void parse_cmdline (int argc, char **argv)
            if (i + 1 < argc)
                i++;
        } else if (strncmp (argv[i], "-config=", 8) == 0) {
-#ifdef FILESYS
-            free_mountinfo (currprefs.mountinfo);
-            currprefs.mountinfo = alloc_mountinfo ();
-#endif
-           cfgfile_load (&currprefs, argv[i] + 8, 0);
+           target_cfgfile_load (&currprefs, argv[i] + 8, 0);
        }
        /* Check for new-style "-f xxx" argument, where xxx is config-file */
        else if (strcmp (argv[i], "-f") == 0) {
@@ -400,7 +396,7 @@ static void parse_cmdline (int argc, char **argv)
                 free_mountinfo (currprefs.mountinfo);
                currprefs.mountinfo = alloc_mountinfo ();
 #endif
-               cfgfile_load (&currprefs, argv[++i], 0);
+               target_cfgfile_load (&currprefs, argv[++i], 0);
            }
        } else if (strcmp (argv[i], "-s") == 0) {
            if (i + 1 == argc)
@@ -444,15 +440,13 @@ static void parse_cmdline_and_init_file (int argc, char **argv)
 
     strcat (optionsfile, restart_config);
 
-    if (! cfgfile_load (&currprefs, optionsfile, 0)) {
+    if (! target_cfgfile_load (&currprefs, optionsfile, 0)) {
        write_log ("failed to load config '%s'\n", optionsfile);
 #ifdef OPTIONS_IN_HOME
        /* sam: if not found in $HOME then look in current directory */
        strcpy (optionsfile, restart_config);
-       cfgfile_load (&currprefs, optionsfile);
+       target_cfgfile_load (&currprefs, optionsfile);
 #endif
-    } else {
-       write_log ("loaded config '%s'\n", optionsfile);
     }
     fix_options ();
 
index 529c20ab222a11d3d8ba7fa86725bab5fff29089..546bda3a81a9e05350e2248f2d38c30bad4fe3df 100755 (executable)
@@ -55,7 +55,7 @@ int avioutput_width = 320, avioutput_height = 256, avioutput_bits = 24;
 int avioutput_fps = VBLANK_HZ_PAL;
 int avioutput_framelimiter = 0;
 
-char avioutput_filename[MAX_DPATH] = "output.avi";
+char avioutput_filename[MAX_DPATH];
 static char avioutput_filename_tmp[MAX_DPATH];
 
 extern struct uae_prefs workprefs;
index e56f4f61e04b682ed369b20c1c466c4c397c4ce8..a57d483d9c07105b11ec19b0b09aeab5a4a1a040 100755 (executable)
@@ -17,6 +17,7 @@
 #define IDS_CHIPSET                     13
 #define IDS_INPUT                       14
 #define IDS_OPENGL                      15
+#define IDS_FILTER                      15
 #define IDS_MISC2                       16
 #define IDS_PATHS                       17
 #define IDS_QUICKSTART                  18
 #define IDS_ERRORTITLE                  159
 #define IDS_SELECTFILESYSROOT           160
 #define IDD_OPENGL                      160
+#define IDD_FILTER                      160
 #define IDS_DEFAULTMIDIOUT              161
 #define IDS_DEFAULTMIDIIN               162
 #define IDS_CONTRIBUTORS1               163
 #define IDS_WINUAETITLE_MMB             236
 #define IDS_WINUAETITLE_NORMAL          237
 #define IDS_STARTEMULATION              238
+#define IDS_TREEVIEW_ABOUT              239
 #define IDC_RESOLUTION                  1021
 #define IDC_SERIAL                      1022
 #define IDC_REFRESHRATE                 1022
 #define IDC_CS_CACHE_TEXT               1582
 #define IDC_FORCE                       1583
 #define IDC_COLLISIONS                  1584
-#define IDC_CS_JIT                      1584
 #define IDC_JITENABLE                   1584
 #define IDC_DISASSEMBLY                 1585
 #define IDC_CTRLF11                     1586
 #define IDC_OPENGLENABLE                1615
 #define IDC_INPUTDEVICEDISABLE          1615
 #define IDC_AVIOUTPUT_ACTIVATED         1615
+#define IDC_FILTERENABLE                1615
 #define IDC_AVIOUTPUT_AUDIO_CODEC       1616
 #define IDC_OPENGLHZ                    1616
 #define IDC_INPUTAMIGACNT               1616
+#define IDC_FILTERHZ                    1616
 #define IDC_AVIOUTPUT_BORDER_TRIM       1617
 #define IDC_OPENGLVZ                    1617
+#define IDC_FILTERVZ                    1617
 #define IDC_AVIOUTPUT_AUDIO_STATIC      1618
 #define IDC_OPENGLHO                    1618
+#define IDC_FILTERHO                    1618
 #define IDC_AVIOUTPUT_VIDEO_STATIC      1619
 #define IDC_OPENGLVO                    1619
+#define IDC_FILTERVO                    1619
 #define IDC_AVIOUTPUT_8BIT              1620
 #define IDC_OPENGLHZV                   1620
 #define IDC_AVIOUTPUT_24BIT             1621
 #define IDC_OPENGLVOV                   1623
 #define IDC_AVIOUTPUT_FRAME             1624
 #define IDC_OPENGLSL                    1624
+#define IDC_FILTERSL                    1624
 #define IDC_OPENGLSLR                   1625
+#define IDC_FILTERSLR                   1625
 #define IDC_OPENGLSLV                   1626
 #define IDC_OPENGLBITS                  1627
 #define IDC_OPENGLMODE                  1627
+#define IDC_FILTERMODE                  1627
 #define IDC_OPENGLFILTER                1628
+#define IDC_FILTERFILTER                1628
 #define IDC_OPENGLDEFAULT               1629
+#define IDC_FILTERDEFAULT               1629
 #define IDC_INPUTDEADZONE               1630
 #define IDC_OPENGLSL2                   1630
+#define IDC_FILTERSL2                   1630
 #define IDC_INPUTCOPY                   1631
 #define IDC_OPENGLSL2V                  1631
+#define IDC_FILTERPRESETS               1631
 #define IDC_SCREENSHOT                  1632
 #define IDC_INPUTSWAP                   1632
+#define IDC_FILTERPRESETLOAD            1632
 #define IDC_FLOPPYSPDTEXT               1633
+#define IDC_FILTERPRESETSAVE            1633
 #define IDC_FLOPPYSPD_TEXT              1634
+#define IDC_FILTERPRESETDELETE          1634
 #define IDC_KAILLERA                    1635
 #define IDC_HARDDRIVE                   1635
 #define IDC_INACTIVE_PRI                1635
 #define IDC_QUICKSTARTMODE              1673
 #define IDC_RESETREGISTRY               1673
 #define IDC_QUICKSTART_MODEL            1674
+#define IDC_PATHS_AVIOUTPUTL            1674
 #define IDC_QUICKSTART_CONFIGURATION    1675
+#define IDC_PATHS_AVIOUTPUT             1675
 #define IDC_QUICKSTART_COMPATIBILITY    1676
+#define IDC_PATHS_SAVESTATES2           1676
+#define IDC_PATHS_AVIOUTPUTS            1676
 #define IDC_QUICKSTART_CONFIG           1677
 #define IDC_DF0Q                        1678
 #define IDC_DF0QQ                       1678
 #define IDC_DF1WPQ                      1686
 #define IDC_EJECT1Q                     1687
 #define IDC_DF1TEXTQ                    1688
+#define IDC_FILTERSL2V                  1691
+#define IDC_FILTERSLV                   1692
+#define IDC_FILTERVOV                   1693
+#define IDC_FILTERHOV                   1694
+#define IDC_FILTERVZV                   1695
+#define IDC_FILTERHZV                   1696
 #define ID__FLOPPYDRIVES                40004
 #define ID_FLOPPYDRIVES_DF0             40005
 #define ID_ST_CONFIGURATION             40010
 #define _APS_3D_CONTROLS                     1
 #define _APS_NEXT_RESOURCE_VALUE        198
 #define _APS_NEXT_COMMAND_VALUE         40020
-#define _APS_NEXT_CONTROL_VALUE         1691
+#define _APS_NEXT_CONTROL_VALUE         1693
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif
index 49552bc890872b67c2ba6d68190632891b65ef16..ffd62f0454f4e81073f51acf37ec0e8a574bea78 100755 (executable)
@@ -87,10 +87,9 @@ BEGIN
                     HIDC_PFULLSCREEN
     CONTROL         "Lo-res",IDC_LORES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
                     131,106,70,10,0,HIDC_LORES
-    LTEXT           "Refresh:",IDC_REFRESHTEXT,34,129,28,8
+    LTEXT           "Refresh:",IDC_REFRESHTEXT,18,129,28,8
     CONTROL         "Slider1",IDC_FRAMERATE,"msctls_trackbar32",
-                    TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,64,124,75,20
-    CTEXT           "",IDC_RATETEXT,144,124,50,20,SS_SUNKEN | WS_BORDER
+                    TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,46,124,75,20
     GROUPBOX        "Centering",IDC_STATIC,221,0,61,67
     CONTROL         "Horizontal",IDC_XCENTER,"Button",BS_AUTOCHECKBOX | 
                     WS_TABSTOP,229,16,45,10
@@ -108,8 +107,9 @@ BEGIN
                     WS_TABSTOP
     CONTROL         "",IDC_DA_SLIDER,"msctls_trackbar32",TBS_AUTOTICKS | 
                     TBS_TOP | NOT WS_VISIBLE | WS_TABSTOP,97,161,101,20
-    PUSHBUTTON      "Detect pixel format",IDC_TEST16BIT,221,163,67,14,0,0,
+    PUSHBUTTON      "Detect pixel format",IDC_TEST16BIT,210,161,73,14,0,0,
                     HIDC_TEST16BIT
+    EDITTEXT        IDC_RATETEXT,126,128,77,12,ES_CENTER | ES_READONLY
 END
 
 IDD_MEMORY DIALOGEX 0, 0, 300, 175
@@ -121,29 +121,24 @@ BEGIN
     RTEXT           "Chip:",-1,24,60,20,10,SS_CENTERIMAGE
     CONTROL         "Slider1",IDC_CHIPMEM,"msctls_trackbar32",TBS_AUTOTICKS | 
                     TBS_TOP | WS_TABSTOP,54,55,50,20
-    CTEXT           "",IDC_CHIPRAM,104,55,35,20,SS_CENTERIMAGE | SS_SUNKEN | 
-                    WS_BORDER
     RTEXT           "Fast:",IDC_FASTTEXT,24,85,20,10,SS_CENTERIMAGE
     CONTROL         "Slider1",IDC_FASTMEM,"msctls_trackbar32",TBS_AUTOTICKS | 
                     TBS_TOP | WS_TABSTOP,54,80,50,20
-    CTEXT           "",IDC_FASTRAM,104,80,35,20,SS_CENTERIMAGE | SS_SUNKEN | 
-                    WS_BORDER
     RTEXT           "Slow:",-1,149,60,20,10,SS_CENTERIMAGE
     CONTROL         "Slider1",IDC_SLOWMEM,"msctls_trackbar32",TBS_AUTOTICKS | 
                     TBS_TOP | WS_TABSTOP,179,55,50,20
-    CTEXT           "",IDC_SLOWRAM,239,55,35,20,SS_CENTERIMAGE | SS_SUNKEN | 
-                    WS_BORDER
     RTEXT           "Z3-Fast:",IDC_Z3TEXT,139,85,30,10,SS_CENTERIMAGE
     CONTROL         "Slider1",IDC_Z3FASTMEM,"msctls_trackbar32",
                     TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,179,80,60,20
-    CTEXT           "",IDC_Z3FASTRAM,239,80,35,20,SS_CENTERIMAGE | SS_SUNKEN | 
-                    WS_BORDER
     RTEXT           "RTG (graphics card):",IDC_GFXCARDTEXT,96,110,76,10,
                     SS_CENTERIMAGE
     CONTROL         "Slider1",IDC_P96MEM,"msctls_trackbar32",TBS_AUTOTICKS | 
                     TBS_TOP | WS_TABSTOP,179,105,60,20
-    CTEXT           "",IDC_P96RAM,239,105,35,20,SS_CENTERIMAGE | SS_SUNKEN | 
-                    WS_BORDER
+    EDITTEXT        IDC_CHIPRAM,105,59,30,12,ES_CENTER | ES_READONLY
+    EDITTEXT        IDC_FASTRAM,105,86,30,12,ES_CENTER | ES_READONLY
+    EDITTEXT        IDC_SLOWRAM,243,58,30,12,ES_CENTER | ES_READONLY
+    EDITTEXT        IDC_Z3FASTRAM,243,85,30,12,ES_CENTER | ES_READONLY
+    EDITTEXT        IDC_P96RAM,243,108,30,12,ES_CENTER | ES_READONLY
 END
 
 IDD_CPU DIALOGEX 0, 0, 300, 191
@@ -329,20 +324,18 @@ BEGIN
                     WS_VSCROLL | WS_TABSTOP
     CONTROL         "",IDC_SOUNDDRIVEVOLUME,"msctls_trackbar32",
                     TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,183,109,107,19
-    GROUPBOX        "Sound buffer size",IDC_STATIC,7,136,120,29
+    GROUPBOX        "Sound buffer size",IDC_STATIC,7,136,161,31
     CONTROL         "Slider1",IDC_SOUNDBUFFERRAM,"msctls_trackbar32",
                     TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,14,144,106,19
-    CTEXT           "",IDC_SOUNDBUFFERMEM,134,144,40,16,SS_CENTERIMAGE | 
-                    SS_SUNKEN | WS_BORDER | WS_TABSTOP
-    GROUPBOX        "Sound driver lag compensation",IDC_STATIC,7,170,120,28
+    GROUPBOX        "Sound driver lag compensation",IDC_STATIC,7,170,286,30
     CONTROL         "Slider1",IDC_SOUNDADJUST,"msctls_trackbar32",
                     TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,14,178,107,19
-    PUSHBUTTON      "Calibrate",IDC_SOUNDCALIBRATE,183,178,40,14
-    CTEXT           "",IDC_SOUNDADJUSTNUM,134,178,40,16,SS_CENTERIMAGE | 
-                    SS_SUNKEN | WS_BORDER | WS_TABSTOP
+    PUSHBUTTON      "Calibrate",IDC_SOUNDCALIBRATE,181,179,40,14
     GROUPBOX        "Volume",IDC_STATIC,181,136,112,29
     CONTROL         "",IDC_SOUNDVOLUME,"msctls_trackbar32",TBS_AUTOTICKS | 
                     TBS_TOP | WS_TABSTOP,183,144,107,19
+    EDITTEXT        IDC_SOUNDBUFFERMEM,123,146,37,12,ES_CENTER | ES_READONLY
+    EDITTEXT        IDC_SOUNDADJUSTNUM,123,180,37,12,ES_CENTER | ES_READONLY
 END
 
 IDD_LOADSAVE DIALOGEX 0, 0, 302, 241
@@ -710,49 +703,49 @@ BEGIN
     PUSHBUTTON      "Swap 1<>2",IDC_INPUTSWAP,249,226,45,14
 END
 
-IDD_OPENGL DIALOGEX 0, 0, 300, 193
+IDD_FILTER DIALOGEX 0, 0, 300, 226
 STYLE DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
 FONT 8, "MS Sans Serif", 0, 0, 0x1
 BEGIN
-    GROUPBOX        "Filter settings:",-1,8,5,285,180
-    CONTROL         "Enable",IDC_OPENGLENABLE,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,26,23,38,10
-    COMBOBOX        IDC_OPENGLMODE,67,21,56,150,CBS_DROPDOWNLIST | 
+    GROUPBOX        "Filter settings:",-1,0,0,291,174
+    CONTROL         "Enable",IDC_FILTERENABLE,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,26,17,38,10
+    COMBOBOX        IDC_FILTERMODE,67,15,56,150,CBS_DROPDOWNLIST | 
                     CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
-    COMBOBOX        IDC_OPENGLFILTER,128,21,65,150,CBS_DROPDOWNLIST | 
+    COMBOBOX        IDC_FILTERFILTER,128,15,65,150,CBS_DROPDOWNLIST | 
                     CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
-    PUSHBUTTON      "Reset to defaults",IDC_OPENGLDEFAULT,197,21,73,14
-    RTEXT           "Horizontal Size",-1,25,52,57,10,SS_CENTERIMAGE
-    CONTROL         "Slider1",IDC_OPENGLHZ,"msctls_trackbar32",TBS_AUTOTICKS | 
-                    TBS_TOP | WS_TABSTOP,89,45,158,19
-    CTEXT           "",IDC_OPENGLHZV,249,47,21,16,SS_CENTERIMAGE | SS_SUNKEN | 
-                    WS_BORDER | WS_TABSTOP
-    RTEXT           "Vertical Size",-1,26,72,57,10,SS_CENTERIMAGE
-    CONTROL         "Slider1",IDC_OPENGLVZ,"msctls_trackbar32",TBS_AUTOTICKS | 
-                    TBS_TOP | WS_TABSTOP,89,65,157,19
-    CTEXT           "",IDC_OPENGLVZV,249,67,21,16,SS_CENTERIMAGE | SS_SUNKEN | 
-                    WS_BORDER | WS_TABSTOP
-    RTEXT           "Horizontal Position",-1,26,92,57,10,SS_CENTERIMAGE
-    CONTROL         "Slider1",IDC_OPENGLHO,"msctls_trackbar32",TBS_AUTOTICKS | 
-                    TBS_TOP | WS_TABSTOP,89,85,157,19
-    CTEXT           "",IDC_OPENGLHOV,249,87,21,16,SS_CENTERIMAGE | SS_SUNKEN | 
-                    WS_BORDER | WS_TABSTOP
-    RTEXT           "Vertical Position",-1,26,111,57,10,SS_CENTERIMAGE
-    CONTROL         "Slider1",IDC_OPENGLVO,"msctls_trackbar32",TBS_AUTOTICKS | 
-                    TBS_TOP | WS_TABSTOP,89,105,157,19
-    CTEXT           "",IDC_OPENGLVOV,249,107,21,16,SS_CENTERIMAGE | 
-                    SS_SUNKEN | WS_BORDER | WS_TABSTOP
-    RTEXT           "Scanlines",-1,27,141,57,10,SS_CENTERIMAGE
-    CONTROL         "Slider1",IDC_OPENGLSL,"msctls_trackbar32",TBS_AUTOTICKS | 
-                    TBS_TOP | WS_TABSTOP,89,134,157,19
-    CTEXT           "",IDC_OPENGLSLV,249,135,21,16,SS_CENTERIMAGE | 
-                    SS_SUNKEN | WS_BORDER | WS_TABSTOP
-    COMBOBOX        IDC_OPENGLSLR,56,154,27,150,CBS_DROPDOWNLIST | 
+    PUSHBUTTON      "Reset to defaults",IDC_FILTERDEFAULT,197,15,73,14
+    RTEXT           "Horizontal Size",-1,25,44,57,10,SS_CENTERIMAGE
+    CONTROL         "Slider1",IDC_FILTERHZ,"msctls_trackbar32",TBS_AUTOTICKS | 
+                    TBS_TOP | WS_TABSTOP,89,37,158,19
+    RTEXT           "Vertical Size",-1,26,64,57,10,SS_CENTERIMAGE
+    CONTROL         "Slider1",IDC_FILTERVZ,"msctls_trackbar32",TBS_AUTOTICKS | 
+                    TBS_TOP | WS_TABSTOP,89,57,157,19
+    RTEXT           "Horizontal Position",-1,26,84,57,10,SS_CENTERIMAGE
+    CONTROL         "Slider1",IDC_FILTERHO,"msctls_trackbar32",TBS_AUTOTICKS | 
+                    TBS_TOP | WS_TABSTOP,89,77,157,19
+    RTEXT           "Vertical Position",-1,26,103,57,10,SS_CENTERIMAGE
+    CONTROL         "Slider1",IDC_FILTERVO,"msctls_trackbar32",TBS_AUTOTICKS | 
+                    TBS_TOP | WS_TABSTOP,89,97,157,19
+    RTEXT           "Scanlines",-1,27,133,57,10,SS_CENTERIMAGE
+    CONTROL         "Slider1",IDC_FILTERSL,"msctls_trackbar32",TBS_AUTOTICKS | 
+                    TBS_TOP | WS_TABSTOP,89,126,157,19
+    COMBOBOX        IDC_FILTERSLR,56,146,27,150,CBS_DROPDOWNLIST | 
                     CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
-    CONTROL         "Slider1",IDC_OPENGLSL2,"msctls_trackbar32",
-                    TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,89,154,157,19
-    CTEXT           "",IDC_OPENGLSL2V,249,154,21,16,SS_CENTERIMAGE | 
-                    SS_SUNKEN | WS_BORDER | WS_TABSTOP
+    CONTROL         "Slider1",IDC_FILTERSL2,"msctls_trackbar32",
+                    TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,89,146,157,19
+    EDITTEXT        IDC_FILTERSL2V,248,151,34,12,ES_CENTER | ES_READONLY
+    EDITTEXT        IDC_FILTERSLV,248,128,34,12,ES_CENTER | ES_READONLY
+    EDITTEXT        IDC_FILTERVOV,248,101,34,12,ES_CENTER | ES_READONLY
+    EDITTEXT        IDC_FILTERHOV,248,79,34,12,ES_CENTER | ES_READONLY
+    EDITTEXT        IDC_FILTERVZV,248,59,34,12,ES_CENTER | ES_READONLY
+    EDITTEXT        IDC_FILTERHZV,248,40,34,12,ES_CENTER | ES_READONLY
+    GROUPBOX        "Presets",-1,0,176,292,36
+    COMBOBOX        IDC_FILTERPRESETS,8,190,119,150,CBS_DROPDOWN | CBS_SORT | 
+                    CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    PUSHBUTTON      "Load",IDC_FILTERPRESETLOAD,132,189,47,14
+    PUSHBUTTON      "Save",IDC_FILTERPRESETSAVE,184,189,47,14
+    PUSHBUTTON      "Delete",IDC_FILTERPRESETDELETE,236,189,47,14
 END
 
 IDD_HARDDRIVE DIALOGEX 0, 0, 229, 66
@@ -831,32 +824,36 @@ BEGIN
     PUSHBUTTON      "Help",IDHELP,366,259,50,14,WS_DISABLED
 END
 
-IDD_PATHS DIALOGEX 0, 0, 300, 223
+IDD_PATHS DIALOGEX 0, 0, 300, 221
 STYLE DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
 FONT 8, "MS Sans Serif", 0, 0, 0x1
 BEGIN
     LTEXT           "ROM path:",IDC_PATHS_ROML,14,9,260,8,SS_CENTERIMAGE
     EDITTEXT        IDC_PATHS_ROM,14,22,261,15,ES_AUTOHSCROLL
     PUSHBUTTON      "...",IDC_PATHS_ROMS,281,22,11,15
-    LTEXT           "Configuration file path:",IDC_PATHS_CONFIGL,14,42,260,8,
+    LTEXT           "Configuration file path:",IDC_PATHS_CONFIGL,14,40,260,8,
+                    SS_CENTERIMAGE
+    EDITTEXT        IDC_PATHS_CONFIG,14,52,261,15,ES_AUTOHSCROLL
+    PUSHBUTTON      "...",IDC_PATHS_CONFIGS,281,52,11,15
+    LTEXT           "Screenshot path:",IDC_PATHS_SCREENSHOTL,14,71,260,8,
                     SS_CENTERIMAGE
-    EDITTEXT        IDC_PATHS_CONFIG,14,55,261,15,ES_AUTOHSCROLL
-    PUSHBUTTON      "...",IDC_PATHS_CONFIGS,281,55,11,15
-    LTEXT           "Screenshot path:",IDC_PATHS_SCREENSHOTL,14,75,260,8,
+    EDITTEXT        IDC_PATHS_SCREENSHOT,14,83,261,15,ES_AUTOHSCROLL
+    PUSHBUTTON      "...",IDC_PATHS_SCREENSHOTS,281,83,11,15
+    LTEXT           "State file path:",IDC_PATHS_STATEFILEL,14,102,260,8,
                     SS_CENTERIMAGE
-    EDITTEXT        IDC_PATHS_SCREENSHOT,14,89,261,15,ES_AUTOHSCROLL
-    PUSHBUTTON      "...",IDC_PATHS_SCREENSHOTS,281,88,11,15
-    LTEXT           "State file path:",IDC_PATHS_STATEFILEL,14,109,260,8,
+    EDITTEXT        IDC_PATHS_SAVESTATE,14,114,261,15,ES_AUTOHSCROLL
+    PUSHBUTTON      "...",IDC_PATHS_SAVESTATES,281,114,11,15
+    LTEXT           "Saveimage path:",IDC_PATHS_SAVEIMAGEL,14,163,260,8,
                     SS_CENTERIMAGE
-    EDITTEXT        IDC_PATHS_SAVESTATE,14,123,261,15,ES_AUTOHSCROLL
-    PUSHBUTTON      "...",IDC_PATHS_SAVESTATES,281,123,11,15
-    LTEXT           "Saveimage path:",IDC_PATHS_SAVEIMAGEL,14,143,260,8,
+    EDITTEXT        IDC_PATHS_SAVEIMAGE,14,175,261,15,ES_AUTOHSCROLL
+    PUSHBUTTON      "...",IDC_PATHS_SAVEIMAGES,281,175,11,15
+    PUSHBUTTON      "Reset to defaults",IDC_PATHS_DEFAULT,13,199,73,14
+    PUSHBUTTON      "Rescan ROMs",IDC_ROM_RESCAN,97,199,73,14
+    PUSHBUTTON      "Clear registry",IDC_RESETREGISTRY,219,199,73,14
+    LTEXT           "Video path:",IDC_PATHS_AVIOUTPUTL,14,132,260,8,
                     SS_CENTERIMAGE
-    EDITTEXT        IDC_PATHS_SAVEIMAGE,14,156,261,15,ES_AUTOHSCROLL
-    PUSHBUTTON      "...",IDC_PATHS_SAVEIMAGES,281,155,11,15
-    PUSHBUTTON      "Reset to defaults",IDC_PATHS_DEFAULT,13,182,73,14
-    PUSHBUTTON      "Rescan ROMs",IDC_ROM_RESCAN,97,182,73,14
-    PUSHBUTTON      "Clear registry",IDC_RESETREGISTRY,219,182,73,14
+    EDITTEXT        IDC_PATHS_AVIOUTPUT,14,144,261,15,ES_AUTOHSCROLL
+    PUSHBUTTON      "...",IDC_PATHS_AVIOUTPUTS,282,144,11,15
 END
 
 IDD_QUICKSTART DIALOGEX 0, 0, 300, 234
@@ -1047,15 +1044,15 @@ BEGIN
         BOTTOMMARGIN, 187
     END
 
-    IDD_PANEL, DIALOG
+    IDD_FILTER, DIALOG
     BEGIN
-        LEFTMARGIN, 7
-        TOPMARGIN, 7
+        RIGHTMARGIN, 292
     END
 
-    IDD_PATHS, DIALOG
+    IDD_PANEL, DIALOG
     BEGIN
-        BOTTOMMARGIN, 215
+        LEFTMARGIN, 7
+        TOPMARGIN, 7
     END
 
     IDD_QUICKSTART, DIALOG
@@ -1130,7 +1127,7 @@ BEGIN
     IDS_CPU                 "CPU"
     IDS_CHIPSET             "Chipset"
     IDS_INPUT               "Input"
-    IDS_OPENGL              "Filter"
+    IDS_FILTER              "Filter"
 END
 
 STRINGTABLE 
@@ -1298,6 +1295,7 @@ BEGIN
     IDS_WINUAETITLE_MMB     "[Mouse active - press Alt-Tab or middle-button to cancel]"
     IDS_WINUAETITLE_NORMAL  "[Mouse active - press Alt-Tab to cancel]"
     IDS_STARTEMULATION      "Start"
+    IDS_TREEVIEW_ABOUT      "About"
 END
 
 #endif    // English (U.S.) resources
index a5d7515eb2fb6b0eb353e5fd649c37a96a7772a0..3df7cb1c72f9d5e829592870a19768074dfca222 100755 (executable)
@@ -1358,10 +1358,6 @@ int needmousehack (void)
     return 1;
 }
 
-void LED (int a)
-{
-}
-
 void logging_init( void )
 {
     static int started;
@@ -1673,6 +1669,7 @@ static void WIN32_HandleRegistryStuff( void )
         initpath ("ScreenshotPath", start_path);
         initpath ("StatefilePath", start_path);
         initpath ("SaveimagePath", start_path);
+        initpath ("VideoPath", start_path);
         if( disposition == REG_CREATED_NEW_KEY )
         {
             /* Create and initialize all our sub-keys to the default values */
index a09880158bb2cde002e983ed5d391ecb48a0171c..117da51955c64387e14c3a555a37e9cf47ada967 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 2"
+#define WINUAEBETASTR " Beta 3"
 
 extern void my_kbd_handler (int, int, int);
 extern void clearallkeys(void);
index 0d7cafab8c25910e41f921de1364520ae7e445e9..5657384b480c6b592920cf085dec1c063388b4da 100755 (executable)
@@ -258,7 +258,7 @@ static void show_rom_list (void)
 
 int scan_roms (char *pathp)
 {
-    HKEY fkey;
+    HKEY fkey = NULL;
     char buf[MAX_PATH], path[MAX_PATH], tmp[100];
     WIN32_FIND_DATA find_data;
     HANDLE handle;
@@ -277,7 +277,7 @@ int scan_roms (char *pathp)
        goto end;
     SHDeleteKey (hWinUAEKey, "DetectedROMs");
     RegCreateKeyEx(hWinUAEKey , "DetectedROMs", 0, NULL, REG_OPTION_NON_VOLATILE,
-       KEY_ALL_ACCESS, NULL, &fkey, NULL);
+       KEY_READ | KEY_WRITE, NULL, &fkey, NULL);
     if (fkey == NULL)
        goto end;
     ret = 0;
@@ -301,6 +301,8 @@ int scan_roms (char *pathp)
        }
     }
 end:
+    if (fkey)
+       RegCloseKey (fkey);
     free_keyfile (keybuf);
     read_rom_list ();
     show_rom_list ();
@@ -341,13 +343,13 @@ static struct ConfigStruct *getconfigstorefrompath (char *path, char *out, int t
     return 0;
 }
 
-static int cfgfile_doload (struct uae_prefs *p, const char *filename, int type)
+int target_cfgfile_load (struct uae_prefs *p, char *filename, int type)
 {
-    int v, i;
+    int v, i, type2;
     DWORD ct, size;
     char tmp1[MAX_DPATH], tmp2[MAX_DPATH];
 
-    if (type == 0) {
+    if (type == 0 || type == 1) {
        if (p->mountinfo == currprefs.mountinfo)
            currprefs.mountinfo = 0;
        discard_prefs (p, 0);
@@ -356,10 +358,14 @@ static int cfgfile_doload (struct uae_prefs *p, const char *filename, int type)
        currprefs.mountinfo = alloc_mountinfo ();
 #endif
     }
-    default_prefs (p, type);
-    v = cfgfile_load (p, filename, 0);
+    type2 = type;
+    if (type == 0)
+       default_prefs (p, type);
+    v = cfgfile_load (p, filename, &type2);
     if (!v)
        return v;
+    if (type > 0)
+       return v;
     for (i = 1; i <= 2; i++) {
        if (type != i) {
            size = sizeof (ct);
@@ -368,10 +374,10 @@ static int cfgfile_doload (struct uae_prefs *p, const char *filename, int type)
            if (ct) {
                size = sizeof (tmp1);
                RegQueryValueEx (hWinUAEKey, configreg[i], 0, NULL, (LPBYTE)tmp1, &size);
-               if (getconfigstorefrompath (tmp1, tmp2, i)) {
-                   v = i;
-                   cfgfile_load (p, tmp2, &v);
-               } 
+               fetch_path ("ConfigurationPath", tmp2, sizeof (tmp2));
+               strcat (tmp2, tmp1);
+               v = i;
+               cfgfile_load (p, tmp2, &v);
            }
        }
     }
@@ -776,7 +782,7 @@ int DiskSelection( HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs,
            disk_creatediskfile( full_path, 1, SendDlgItemMessage( hDlg, IDC_FLOPPYTYPE, CB_GETCURSEL, 0, 0L ));
            break;
        case IDC_LOAD:
-           if (cfgfile_doload(&workprefs, full_path, 0) == 0)
+           if (target_cfgfile_load(&workprefs, full_path, 0) == 0)
            {
                char szMessage[MAX_DPATH];
                WIN32GUI_LoadUIString (IDS_COULDNOTLOADCONFIG, szMessage, MAX_DPATH);
@@ -1138,7 +1144,7 @@ static char *HandleConfiguration (HWND hDlg, int flag, struct ConfigStruct *conf
                WIN32GUI_LoadUIString( IDS_MUSTSELECTCONFIG, szMessage, MAX_DPATH );
                pre_gui_message (szMessage);
            } else {
-               if (cfgfile_doload (&workprefs, path, configtypepanel) == 0) {
+               if (target_cfgfile_load (&workprefs, path, configtypepanel) == 0) {
                    char szMessage[ MAX_DPATH ];
                    WIN32GUI_LoadUIString( IDS_COULDNOTLOADCONFIG, szMessage, MAX_DPATH );
                    pre_gui_message (szMessage);
@@ -2094,6 +2100,7 @@ static void values_to_pathsdialog (HWND hDlg)
     setpath (hDlg, "ScreenshotPath", IDC_PATHS_SCREENSHOT, "ScreenShots");
     setpath (hDlg, "StatefilePath", IDC_PATHS_SAVESTATE, "Savestates");
     setpath (hDlg, "SaveimagePath", IDC_PATHS_SAVEIMAGE, "SaveImages");
+    setpath (hDlg, "VideoPath", IDC_PATHS_AVIOUTPUT, "Videos");
 }
 
 static void resetregistry (void)
@@ -2102,14 +2109,15 @@ static void resetregistry (void)
        return;
     SHDeleteKey (hWinUAEKey, "DetectedROMs");
     SHDeleteKey (hWinUAEKey, "QuickStartMode");
-    SHDeleteKey (hWinUAEKey, "ConfigFile");
-    SHDeleteKey (hWinUAEKey, "ConfigurationPath");
-    SHDeleteKey (hWinUAEKey, "SaveimagePath");
-    SHDeleteKey (hWinUAEKey, "ScreenshotPath");
-    SHDeleteKey (hWinUAEKey, "StatefilePath");
-    SHDeleteKey (hWinUAEKey, "QuickStartModel");
-    SHDeleteKey (hWinUAEKey, "QuickStartConfiguration");
-    SHDeleteKey (hWinUAEKey, "QuickStartCompatibility");
+    RegDeleteValue (hWinUAEKey, "ConfigFile");
+    RegDeleteValue (hWinUAEKey, "ConfigurationPath");
+    RegDeleteValue (hWinUAEKey, "SaveimagePath");
+    RegDeleteValue (hWinUAEKey, "ScreenshotPath");
+    RegDeleteValue (hWinUAEKey, "StatefilePath");
+    RegDeleteValue (hWinUAEKey, "VideoPath");
+    RegDeleteValue (hWinUAEKey, "QuickStartModel");
+    RegDeleteValue (hWinUAEKey, "QuickStartConfiguration");
+    RegDeleteValue (hWinUAEKey, "QuickStartCompatibility");
 }
 
 static BOOL CALLBACK PathsDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -2173,12 +2181,20 @@ static BOOL CALLBACK PathsDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP
                values_to_pathsdialog (hDlg);
            }
            break;
+           case IDC_PATHS_AVIOUTPUTS:
+           fetch_path ("VideoPath", tmp, sizeof (tmp));
+           if (DirectorySelection (hDlg, 0, tmp)) {
+               set_path ("VideoPath", tmp);
+               values_to_pathsdialog (hDlg);
+           }
+           break;
            case IDC_PATHS_DEFAULT:
            set_path ("KickstartPath", NULL);
            set_path ("ConfigurationPath", NULL);
            set_path ("ScreenshotPath", NULL);
            set_path ("StatefilePath", NULL);
            set_path ("SaveimagePath", NULL);
+           set_path ("VideoPath", NULL);
            values_to_pathsdialog (hDlg);
            break;
            case IDC_ROM_RESCAN:
@@ -2609,18 +2625,9 @@ static void enable_for_displaydlg (HWND hDlg)
     else
     {
         CheckDlgButton( hDlg, IDC_VSYNC, workprefs.gfx_vsync);
-        if (workprefs.gfx_filter) {
-           EnableWindow (GetDlgItem (hDlg, IDC_XCENTER), FALSE);
-           EnableWindow (GetDlgItem (hDlg, IDC_YCENTER), FALSE);
-           EnableWindow (GetDlgItem (hDlg, IDC_LM_SCANLINES), FALSE);
-           if (workprefs.gfx_linedbl == 2)
-               workprefs.gfx_linedbl = 1;
-           workprefs.gfx_xcenter = workprefs.gfx_ycenter = 0;
-       } else {
-           EnableWindow (GetDlgItem (hDlg, IDC_XCENTER), TRUE);
-           EnableWindow (GetDlgItem (hDlg, IDC_YCENTER), TRUE);
-           EnableWindow (GetDlgItem (hDlg, IDC_LM_SCANLINES), TRUE);
-       }
+        EnableWindow (GetDlgItem (hDlg, IDC_XCENTER), TRUE);
+        EnableWindow (GetDlgItem (hDlg, IDC_YCENTER), TRUE);
+        EnableWindow (GetDlgItem (hDlg, IDC_LM_SCANLINES), TRUE);
     }
 }
 
@@ -3469,7 +3476,7 @@ static void getromfile (HWND hDlg, DWORD d, char *path, int size)
        if (rd && hWinUAEKey) {
            HKEY fkey;
            RegCreateKeyEx(hWinUAEKey , "DetectedROMs", 0, NULL, REG_OPTION_NON_VOLATILE,
-               KEY_ALL_ACCESS, NULL, &fkey, NULL);
+               KEY_READ | KEY_WRITE, NULL, &fkey, NULL);
            if (fkey) {
                DWORD outsize = size;
                sprintf (tmp1, "ROM%02d", rd->id);
@@ -3498,7 +3505,7 @@ static void values_to_kickstartdlg (HWND hDlg)
 
     if (hWinUAEKey) {
        RegCreateKeyEx(hWinUAEKey , "DetectedROMs", 0, NULL, REG_OPTION_NON_VOLATILE,
-           KEY_ALL_ACCESS, NULL, &fkey, NULL);
+           KEY_READ | KEY_WRITE, NULL, &fkey, NULL);
         keybuf = load_keyfile (&workprefs, NULL, &keysize);
        addromfiles (fkey, hDlg, IDC_ROMFILE, workprefs.romfile, keybuf, keysize, ROMTYPE_KICK | ROMTYPE_KICKCD32);
        addromfiles (fkey, hDlg, IDC_ROMFILE2, workprefs.romextfile, keybuf, keysize, ROMTYPE_EXTCD32 | ROMTYPE_EXTCDTV);
@@ -4994,7 +5001,7 @@ HKEY read_disk_history (void)
     if (!hWinUAEKey)
        return NULL;
     RegCreateKeyEx(hWinUAEKey , "DiskImageMRUList", 0, NULL, REG_OPTION_NON_VOLATILE,
-       KEY_ALL_ACCESS, NULL, &fkey, NULL);
+       KEY_READ | KEY_WRITE, NULL, &fkey, NULL);
     if (fkey == NULL || regread)
        return fkey;
 
@@ -5003,7 +5010,7 @@ HKEY read_disk_history (void)
         int err;
         size = sizeof (tmp);
         size2 = sizeof (tmp2);
-        err = RegEnumValue(fkey, idx, tmp, &size, NULL, NULL, tmp2, &size2);
+        err = RegEnumValue (fkey, idx, tmp, &size, NULL, NULL, tmp2, &size2);
         if (err != ERROR_SUCCESS)
            break;
         if (strlen (tmp) == 7) {
@@ -6154,6 +6161,7 @@ static BOOL CALLBACK InputDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPa
 
 static int scanlineratios[] = { 1,1,1,2,1,3, 2,1,2,2,2,3, 3,1,3,2,3,3, 0,0 };
 static int scanlineindexes[100];
+static int filterpreset = 0;
 
 static void enable_for_hw3ddlg (HWND hDlg)
 {
@@ -6175,18 +6183,21 @@ static void enable_for_hw3ddlg (HWND hDlg)
        vv = TRUE;
     if (v && uf->x[0])
        vv2 = TRUE;
-    EnableWindow (GetDlgItem (hDlg, IDC_OPENGLENABLE), TRUE);
-    EnableWindow (GetDlgItem (hDlg, IDC_OPENGLBITS), v);
-    CheckDlgButton( hDlg, IDC_OPENGLENABLE, v );
-    EnableWindow (GetDlgItem (hDlg, IDC_OPENGLHZ), vv2);
-    EnableWindow (GetDlgItem (hDlg, IDC_OPENGLVZ), vv2);
-    EnableWindow (GetDlgItem (hDlg, IDC_OPENGLHO), v);
-    EnableWindow (GetDlgItem (hDlg, IDC_OPENGLVO), v);
-    EnableWindow (GetDlgItem (hDlg, IDC_OPENGLSLR), vv2);
-    EnableWindow (GetDlgItem (hDlg, IDC_OPENGLSL), vv2);
-    EnableWindow (GetDlgItem (hDlg, IDC_OPENGLSL2), vv2);
-    EnableWindow (GetDlgItem (hDlg, IDC_OPENGLDEFAULT), v);
-    EnableWindow (GetDlgItem (hDlg, IDC_OPENGLFILTER), vv);
+    EnableWindow (GetDlgItem (hDlg, IDC_FILTERENABLE), TRUE);
+    EnableWindow (GetDlgItem (hDlg, IDC_FILTERMODE), v);
+    CheckDlgButton( hDlg, IDC_FILTERENABLE, v );
+    EnableWindow (GetDlgItem (hDlg, IDC_FILTERHZ), vv2);
+    EnableWindow (GetDlgItem (hDlg, IDC_FILTERVZ), vv2);
+    EnableWindow (GetDlgItem (hDlg, IDC_FILTERHO), v);
+    EnableWindow (GetDlgItem (hDlg, IDC_FILTERVO), v);
+    EnableWindow (GetDlgItem (hDlg, IDC_FILTERSLR), vv2);
+    EnableWindow (GetDlgItem (hDlg, IDC_FILTERSL), vv2);
+    EnableWindow (GetDlgItem (hDlg, IDC_FILTERSL2), vv2);
+    EnableWindow (GetDlgItem (hDlg, IDC_FILTERDEFAULT), v);
+    EnableWindow (GetDlgItem (hDlg, IDC_FILTERFILTER), vv);
+
+    EnableWindow (GetDlgItem (hDlg, IDC_FILTERPRESETLOAD), filterpreset > 0);
+    EnableWindow (GetDlgItem (hDlg, IDC_FILTERPRESETDELETE), filterpreset > 0);
 }
 
 static void makefilter(char *s, int x, int flags)
@@ -6207,22 +6218,22 @@ static void values_to_hw3ddlg (HWND hDlg)
     char txt[100], tmp[100];
     int i, j, nofilter, fltnum, modenum;
     struct uae_filter *uf;
+    HKEY fkey;
 
-    SendDlgItemMessage( hDlg, IDC_OPENGLHZ, TBM_SETRANGE, TRUE, MAKELONG (-99, +99) );
-    SendDlgItemMessage( hDlg, IDC_OPENGLHZ, TBM_SETPAGESIZE, 0, 1 );
-    SendDlgItemMessage( hDlg, IDC_OPENGLVZ, TBM_SETRANGE, TRUE, MAKELONG (-99, +99) );
-    SendDlgItemMessage( hDlg, IDC_OPENGLVZ, TBM_SETPAGESIZE, 0, 1 );
-    SendDlgItemMessage( hDlg, IDC_OPENGLHO, TBM_SETRANGE, TRUE, MAKELONG (-99, +99) );
-    SendDlgItemMessage( hDlg, IDC_OPENGLHO, TBM_SETPAGESIZE, 0, 1 );
-    SendDlgItemMessage( hDlg, IDC_OPENGLVO, TBM_SETRANGE, TRUE, MAKELONG (-50, +50) );
-    SendDlgItemMessage( hDlg, IDC_OPENGLVO, TBM_SETPAGESIZE, 0, 1 );
-    SendDlgItemMessage( hDlg, IDC_OPENGLSL, TBM_SETRANGE, TRUE, MAKELONG (   0, +100) );
-    SendDlgItemMessage( hDlg, IDC_OPENGLSL, TBM_SETPAGESIZE, 0, 10 );
-    SendDlgItemMessage( hDlg, IDC_OPENGLSL2, TBM_SETRANGE, TRUE, MAKELONG (   0, +100) );
-    SendDlgItemMessage( hDlg, IDC_OPENGLSL2, TBM_SETPAGESIZE, 0, 10 );
-
-    SendDlgItemMessage (hDlg, IDC_OPENGLBITS, CB_RESETCONTENT, 0, 0L);
-
+    SendDlgItemMessage( hDlg, IDC_FILTERHZ, TBM_SETRANGE, TRUE, MAKELONG (-99, +99) );
+    SendDlgItemMessage( hDlg, IDC_FILTERHZ, TBM_SETPAGESIZE, 0, 1 );
+    SendDlgItemMessage( hDlg, IDC_FILTERVZ, TBM_SETRANGE, TRUE, MAKELONG (-99, +99) );
+    SendDlgItemMessage( hDlg, IDC_FILTERVZ, TBM_SETPAGESIZE, 0, 1 );
+    SendDlgItemMessage( hDlg, IDC_FILTERHO, TBM_SETRANGE, TRUE, MAKELONG (-99, +99) );
+    SendDlgItemMessage( hDlg, IDC_FILTERHO, TBM_SETPAGESIZE, 0, 1 );
+    SendDlgItemMessage( hDlg, IDC_FILTERVO, TBM_SETRANGE, TRUE, MAKELONG (-50, +50) );
+    SendDlgItemMessage( hDlg, IDC_FILTERVO, TBM_SETPAGESIZE, 0, 1 );
+    SendDlgItemMessage( hDlg, IDC_FILTERSL, TBM_SETRANGE, TRUE, MAKELONG (   0, +100) );
+    SendDlgItemMessage( hDlg, IDC_FILTERSL, TBM_SETPAGESIZE, 0, 10 );
+    SendDlgItemMessage( hDlg, IDC_FILTERSL2, TBM_SETRANGE, TRUE, MAKELONG (   0, +100) );
+    SendDlgItemMessage( hDlg, IDC_FILTERSL2, TBM_SETPAGESIZE, 0, 10 );
+
+    SendDlgItemMessage (hDlg, IDC_FILTERMODE, CB_RESETCONTENT, 0, 0L);
     uf = &uaefilters[0];
     nofilter = 0; fltnum = 0;
     i = 0; j = 0;
@@ -6244,7 +6255,7 @@ static void values_to_hw3ddlg (HWND hDlg)
            break;
        }
        if (nofilter == 0) {
-           SendDlgItemMessage (hDlg, IDC_OPENGLBITS, CB_ADDSTRING, 0, (LPARAM)uaefilters[i].name);
+           SendDlgItemMessage (hDlg, IDC_FILTERMODE, CB_ADDSTRING, 0, (LPARAM)uaefilters[i].name);
            if (uaefilters[i].type == workprefs.gfx_filter) {
                uf = &uaefilters[i];
                fltnum = j;
@@ -6253,22 +6264,22 @@ static void values_to_hw3ddlg (HWND hDlg)
        }
        i++;
     }
-    SendDlgItemMessage( hDlg, IDC_OPENGLBITS, CB_SETCURSEL, fltnum, 0 );
+    SendDlgItemMessage( hDlg, IDC_FILTERMODE, CB_SETCURSEL, fltnum, 0 );
 
-    SendDlgItemMessage (hDlg, IDC_OPENGLFILTER, CB_RESETCONTENT, 0, 0L);
+    SendDlgItemMessage (hDlg, IDC_FILTERFILTER, CB_RESETCONTENT, 0, 0L);
     if (uf->x[0]) {
        WIN32GUI_LoadUIString (IDS_3D_NO_FILTER, txt, sizeof (txt));
        sprintf (tmp, txt, 16);
-        SendDlgItemMessage (hDlg, IDC_OPENGLFILTER, CB_ADDSTRING, 0, (LPARAM)tmp);
+        SendDlgItemMessage (hDlg, IDC_FILTERFILTER, CB_ADDSTRING, 0, (LPARAM)tmp);
        WIN32GUI_LoadUIString (IDS_3D_BILINEAR, txt, sizeof (txt));
        sprintf (tmp, txt, 16);
-       SendDlgItemMessage (hDlg, IDC_OPENGLFILTER, CB_ADDSTRING, 0, (LPARAM)tmp);
+       SendDlgItemMessage (hDlg, IDC_FILTERFILTER, CB_ADDSTRING, 0, (LPARAM)tmp);
        WIN32GUI_LoadUIString (IDS_3D_NO_FILTER, txt, sizeof (txt));
        sprintf (tmp, txt, 32);
-        SendDlgItemMessage (hDlg, IDC_OPENGLFILTER, CB_ADDSTRING, 0, (LPARAM)tmp);
+        SendDlgItemMessage (hDlg, IDC_FILTERFILTER, CB_ADDSTRING, 0, (LPARAM)tmp);
        WIN32GUI_LoadUIString (IDS_3D_BILINEAR, txt, sizeof (txt));
        sprintf (tmp, txt, 32);
-       SendDlgItemMessage (hDlg, IDC_OPENGLFILTER, CB_ADDSTRING, 0, (LPARAM)tmp);
+       SendDlgItemMessage (hDlg, IDC_FILTERFILTER, CB_ADDSTRING, 0, (LPARAM)tmp);
        modenum = 4;
     } else {
        workprefs.gfx_filter_horiz_zoom = 0;
@@ -6277,46 +6288,189 @@ static void values_to_hw3ddlg (HWND hDlg)
        for (i = 1; i <= 4; i++) {
            if (uf->x[i]) {
                makefilter (tmp, i, uf->x[i]);
-               SendDlgItemMessage (hDlg, IDC_OPENGLFILTER, CB_ADDSTRING, 0, (LPARAM)tmp);
+               SendDlgItemMessage (hDlg, IDC_FILTERFILTER, CB_ADDSTRING, 0, (LPARAM)tmp);
                modenum++;
            }
        }
     }
     if (workprefs.gfx_filter_filtermode >= modenum)
        workprefs.gfx_filter_filtermode = 0;
-    SendDlgItemMessage (hDlg, IDC_OPENGLFILTER, CB_SETCURSEL, workprefs.gfx_filter_filtermode, 0);
+    SendDlgItemMessage (hDlg, IDC_FILTERFILTER, CB_SETCURSEL, workprefs.gfx_filter_filtermode, 0);
 
-    SendDlgItemMessage (hDlg, IDC_OPENGLSLR, CB_RESETCONTENT, 0, 0L);
+    SendDlgItemMessage (hDlg, IDC_FILTERSLR, CB_RESETCONTENT, 0, 0L);
     i = j = 0;
     while (scanlineratios[i * 2]) {
        int sl = scanlineratios[i * 2] * 16 + scanlineratios[i * 2 + 1];
        sprintf (txt, "%d:%d", scanlineratios[i * 2], scanlineratios[i * 2 + 1]);
        if (workprefs.gfx_filter_scanlineratio == sl)
            j = i;
-        SendDlgItemMessage (hDlg, IDC_OPENGLSLR, CB_ADDSTRING, 0, (LPARAM)txt);
+        SendDlgItemMessage (hDlg, IDC_FILTERSLR, CB_ADDSTRING, 0, (LPARAM)txt);
        scanlineindexes[i] = sl;
        i++;
     }
-    SendDlgItemMessage (hDlg, IDC_OPENGLSLR, CB_SETCURSEL, j, 0);
-
-    SendDlgItemMessage (hDlg, IDC_OPENGLHZ, TBM_SETPOS, TRUE, workprefs.gfx_filter_horiz_zoom);
-    SendDlgItemMessage (hDlg, IDC_OPENGLVZ, TBM_SETPOS, TRUE, workprefs.gfx_filter_vert_zoom);
-    SendDlgItemMessage (hDlg, IDC_OPENGLHO, TBM_SETPOS, TRUE, workprefs.gfx_filter_horiz_offset);
-    SendDlgItemMessage (hDlg, IDC_OPENGLVO, TBM_SETPOS, TRUE, workprefs.gfx_filter_vert_offset);
-    SendDlgItemMessage (hDlg, IDC_OPENGLSL, TBM_SETPOS, TRUE, workprefs.gfx_filter_scanlines);
-    SendDlgItemMessage (hDlg, IDC_OPENGLSL2, TBM_SETPOS, TRUE, workprefs.gfx_filter_scanlinelevel);
-    SetDlgItemInt (hDlg, IDC_OPENGLHZV, workprefs.gfx_filter_horiz_zoom, TRUE);
-    SetDlgItemInt (hDlg, IDC_OPENGLVZV, workprefs.gfx_filter_vert_zoom, TRUE);
-    SetDlgItemInt (hDlg, IDC_OPENGLHOV, workprefs.gfx_filter_horiz_offset, TRUE);
-    SetDlgItemInt (hDlg, IDC_OPENGLVOV, workprefs.gfx_filter_vert_offset, TRUE);
-    SetDlgItemInt (hDlg, IDC_OPENGLSLV, workprefs.gfx_filter_scanlines, TRUE);
-    SetDlgItemInt (hDlg, IDC_OPENGLSL2V, workprefs.gfx_filter_scanlinelevel, TRUE);
+    SendDlgItemMessage (hDlg, IDC_FILTERSLR, CB_SETCURSEL, j, 0);
+    
+    j = 0;
+    SendDlgItemMessage (hDlg, IDC_FILTERPRESETS, CB_RESETCONTENT, 0, 0L);
+    SendDlgItemMessage (hDlg, IDC_FILTERPRESETS, CB_ADDSTRING, 0, (LPARAM)"");
+    if (hWinUAEKey) {
+       RegCreateKeyEx(hWinUAEKey , "FilterPresets", 0, NULL, REG_OPTION_NON_VOLATILE,
+           KEY_READ, NULL, &fkey, NULL);
+       if (fkey) {
+           int idx = 0;
+           char tmp[MAX_DPATH], tmp2[MAX_DPATH];
+           DWORD size, size2;
+
+           for (;;) {
+               int err;
+               size = sizeof (tmp);
+               size2 = sizeof (tmp2);
+               err = RegEnumValue(fkey, idx, tmp, &size, NULL, NULL, tmp2, &size2);
+               if (err != ERROR_SUCCESS)
+                   break;
+               SendDlgItemMessage (hDlg, IDC_FILTERPRESETS, CB_ADDSTRING, 0, (LPARAM)tmp);
+               idx++;
+           }
+           SendDlgItemMessage (hDlg, IDC_FILTERPRESETS, CB_SETCURSEL, filterpreset, 0);
+           RegCloseKey (fkey);
+       }
+    }
+    
+    SendDlgItemMessage (hDlg, IDC_FILTERHZ, TBM_SETPOS, TRUE, workprefs.gfx_filter_horiz_zoom);
+    SendDlgItemMessage (hDlg, IDC_FILTERVZ, TBM_SETPOS, TRUE, workprefs.gfx_filter_vert_zoom);
+    SendDlgItemMessage (hDlg, IDC_FILTERHO, TBM_SETPOS, TRUE, workprefs.gfx_filter_horiz_offset);
+    SendDlgItemMessage (hDlg, IDC_FILTERVO, TBM_SETPOS, TRUE, workprefs.gfx_filter_vert_offset);
+    SendDlgItemMessage (hDlg, IDC_FILTERSL, TBM_SETPOS, TRUE, workprefs.gfx_filter_scanlines);
+    SendDlgItemMessage (hDlg, IDC_FILTERSL2, TBM_SETPOS, TRUE, workprefs.gfx_filter_scanlinelevel);
+    SetDlgItemInt (hDlg, IDC_FILTERHZV, workprefs.gfx_filter_horiz_zoom, TRUE);
+    SetDlgItemInt (hDlg, IDC_FILTERVZV, workprefs.gfx_filter_vert_zoom, TRUE);
+    SetDlgItemInt (hDlg, IDC_FILTERHOV, workprefs.gfx_filter_horiz_offset, TRUE);
+    SetDlgItemInt (hDlg, IDC_FILTERVOV, workprefs.gfx_filter_vert_offset, TRUE);
+    SetDlgItemInt (hDlg, IDC_FILTERSLV, workprefs.gfx_filter_scanlines, TRUE);
+    SetDlgItemInt (hDlg, IDC_FILTERSL2V, workprefs.gfx_filter_scanlinelevel, TRUE);
 }
 
 static void values_from_hw3ddlg (HWND hDlg)
 {
 }
 
+static void filter_preset (HWND hDlg, WPARAM wParam)
+{
+    int item, ok, err, load;
+    char tmp1[MAX_DPATH], tmp2[MAX_DPATH];
+    DWORD outsize;
+    HKEY fkey;
+    struct uae_prefs *p = &workprefs;
+
+    load = 0;
+    ok = 0;
+    if (!hWinUAEKey)
+       return;
+    RegCreateKeyEx(hWinUAEKey , "FilterPresets", 0, NULL, REG_OPTION_NON_VOLATILE,
+        KEY_READ | KEY_WRITE, NULL, &fkey, NULL);
+    if (!fkey)
+       return;
+    item = SendDlgItemMessage (hDlg, IDC_FILTERPRESETS, CB_GETCURSEL, 0, 0);
+    tmp1[0] = 0;
+    if (item != CB_ERR) {
+       filterpreset = item;
+        SendDlgItemMessage (hDlg, IDC_FILTERPRESETS, CB_GETLBTEXT, (WPARAM)item, (LPARAM)tmp1);
+    } else {
+        SendDlgItemMessage (hDlg, IDC_FILTERPRESETS, WM_GETTEXT, (WPARAM)item, (LPARAM)tmp1);
+    }
+    outsize = sizeof (tmp2);
+    if (tmp1[0] && RegQueryValueEx (fkey, tmp1, NULL, NULL, tmp2, &outsize) == ERROR_SUCCESS)
+       ok = 1;
+    
+    if (wParam == IDC_FILTERPRESETSAVE) {
+        sprintf (tmp2, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",
+           p->gfx_filter, p->gfx_filter_filtermode,
+           p->gfx_filter_vert_zoom, p->gfx_filter_horiz_zoom,
+           p->gfx_filter_vert_offset, p->gfx_filter_horiz_offset,
+           p->gfx_filter_scanlines, p->gfx_filter_scanlinelevel, p->gfx_filter_scanlineratio,
+           p->gfx_lores, p->gfx_linedbl, p->gfx_correct_aspect,
+           p->gfx_xcenter, p->gfx_ycenter);
+       if (ok == 0) {
+           tmp1[0] = 0;
+           SendDlgItemMessage (hDlg, IDC_FILTERPRESETS, WM_GETTEXT, (WPARAM)sizeof (tmp1), (LPARAM)tmp1);
+           if (tmp1[0] == 0) {
+               gui_message ("No name");
+               goto end;
+           }
+       }
+       RegSetValueEx (fkey, tmp1, 0, REG_SZ, (CONST BYTE *)&tmp2, strlen (tmp2) + 1);
+        values_to_hw3ddlg (hDlg);
+    }
+    if (ok) {
+       if (wParam == IDC_FILTERPRESETDELETE) {
+           err = RegDeleteValue (fkey, tmp1);
+           values_to_hw3ddlg (hDlg);
+       } else if (wParam == IDC_FILTERPRESETLOAD) {
+           char *s = tmp2;
+           char *t;
+           
+           load = 1;
+           strcat (s, ",");
+           t = strchr (s, ',');
+           *t++ = 0;
+           p->gfx_filter = atol (s);
+           s = t; t = strchr (s, ','); if (!t) goto end; *t++ = 0;
+           p->gfx_filter_filtermode = atol (s);
+           s = t; t = strchr (s, ','); if (!t) goto end; *t++ = 0;
+           p->gfx_filter_vert_zoom = atol (s);
+           s = t; t = strchr (s, ','); if (!t) goto end; *t++ = 0;
+           p->gfx_filter_horiz_zoom = atol (s);
+           s = t; t = strchr (s, ','); if (!t) goto end; *t++ = 0;
+           p->gfx_filter_vert_offset = atol (s);
+           s = t; t = strchr (s, ','); if (!t) goto end; *t++ = 0;
+           p->gfx_filter_horiz_offset = atol (s);
+           s = t; t = strchr (s, ','); if (!t) goto end; *t++ = 0;
+           p->gfx_filter_scanlines = atol (s);
+           s = t; t = strchr (s, ','); if (!t) goto end; *t++ = 0;
+           p->gfx_filter_scanlinelevel = atol (s);
+           s = t; t = strchr (s, ','); if (!t) goto end; *t++ = 0;
+           p->gfx_filter_scanlineratio = atol (s);
+           s = t; t = strchr (s, ','); if (!t) goto end; *t++ = 0;
+           p->gfx_lores = atol (s);
+           s = t; t = strchr (s, ','); if (!t) goto end; *t++ = 0;
+           p->gfx_linedbl = atol (s);
+           s = t; t = strchr (s, ','); if (!t) goto end; *t++ = 0;
+           p->gfx_correct_aspect = atol (s);
+           s = t; t = strchr (s, ','); if (!t) goto end; *t++ = 0;
+           p->gfx_xcenter = atol (s);
+           s = t; t = strchr (s, ','); if (!t) goto end; *t++ = 0;
+           p->gfx_ycenter = atol (s);
+       }
+    }
+end:
+    RegCloseKey (fkey);
+    if (load)
+        values_to_hw3ddlg (hDlg);
+    enable_for_hw3ddlg (hDlg);
+}
+
+static void filter_handle (HWND hDlg)
+{
+    int item = SendDlgItemMessage (hDlg, IDC_FILTERMODE, CB_GETCURSEL, 0, 0L);
+    if (item != CB_ERR) {
+       int of = workprefs.gfx_filter;
+       int off = workprefs.gfx_filter_filtermode;
+       workprefs.gfx_filter = 0;
+       if (IsDlgButtonChecked (hDlg, IDC_FILTERENABLE)) {
+           workprefs.gfx_filter = uaefilters[item].type;
+           item = SendDlgItemMessage (hDlg, IDC_FILTERFILTER, CB_GETCURSEL, 0, 0L);
+           if (item != CB_ERR)
+               workprefs.gfx_filter_filtermode = item;
+           if (of != workprefs.gfx_filter || off != workprefs.gfx_filter_filtermode) {
+               values_to_hw3ddlg (hDlg);
+               hw3d_changed = 1;
+           }
+       }
+    }
+    enable_for_hw3ddlg (hDlg);
+    updatedisplayarea ();
+}
+
 static BOOL CALLBACK hw3dDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
 {
     static int recursive;
@@ -6330,56 +6484,71 @@ static BOOL CALLBACK hw3dDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPar
        enable_for_hw3ddlg (hDlg);
            
     case WM_USER:
+       if(recursive > 0)
+           break;
        recursive++;
        enable_for_hw3ddlg( hDlg );
        values_to_hw3ddlg (hDlg);
        recursive--;
        return TRUE;
     case WM_COMMAND:
-       if (wParam == IDC_OPENGLDEFAULT) {
+       if(recursive > 0)
+           break;
+       recursive++;
+       switch (wParam)
+       {
+           case IDC_FILTERDEFAULT:
            currprefs.gfx_filter_horiz_zoom = workprefs.gfx_filter_horiz_zoom = 0;
            currprefs.gfx_filter_vert_zoom = workprefs.gfx_filter_vert_zoom = 0;
            currprefs.gfx_filter_horiz_offset = workprefs.gfx_filter_horiz_offset = 0;
            currprefs.gfx_filter_vert_offset = workprefs.gfx_filter_vert_offset = 0;
            values_to_hw3ddlg (hDlg);
-       }
-       item = SendDlgItemMessage( hDlg, IDC_OPENGLSLR, CB_GETCURSEL, 0, 0L );
-       if (item != CB_ERR)
-           currprefs.gfx_filter_scanlineratio = workprefs.gfx_filter_scanlineratio = scanlineindexes[item];
-       item = SendDlgItemMessage( hDlg, IDC_OPENGLMODE, CB_GETCURSEL, 0, 0L );
-       if (item != CB_ERR) {
-           int of = workprefs.gfx_filter;
-           int off = workprefs.gfx_filter_filtermode;
-           workprefs.gfx_filter = 0;
-           if (IsDlgButtonChecked( hDlg, IDC_OPENGLENABLE)) {
-               workprefs.gfx_filter = uaefilters[item].type;
-               item = SendDlgItemMessage( hDlg, IDC_OPENGLFILTER, CB_GETCURSEL, 0, 0L );
-               if (item != CB_ERR)
-                   workprefs.gfx_filter_filtermode = item;
-               if (of != workprefs.gfx_filter || off != workprefs.gfx_filter_filtermode) {
-                   values_to_hw3ddlg (hDlg);
-                   enable_for_hw3ddlg (hDlg);
-                   hw3d_changed = 1;
+           break;
+           case IDC_FILTERPRESETLOAD:
+           case IDC_FILTERPRESETSAVE:
+           case IDC_FILTERPRESETDELETE:
+           filter_preset (hDlg, wParam);
+           break;
+           case IDC_FILTERENABLE:
+           filter_handle (hDlg);
+           break;
+           default:
+           if (HIWORD (wParam) == CBN_SELCHANGE || HIWORD (wParam) == CBN_KILLFOCUS)  {
+               switch (LOWORD (wParam))
+               {
+                   case IDC_FILTERPRESETS:
+                   filter_preset (hDlg, LOWORD (wParam));
+                   break;
+                   case IDC_FILTERSLR:
+                   item = SendDlgItemMessage (hDlg, IDC_FILTERSLR, CB_GETCURSEL, 0, 0L);
+                   if (item != CB_ERR) {
+                       currprefs.gfx_filter_scanlineratio = workprefs.gfx_filter_scanlineratio = scanlineindexes[item];
+                       updatedisplayarea ();
+                   }
+                   break;
+                   case IDC_FILTERMODE:
+                   case IDC_FILTERFILTER:
+                   filter_handle (hDlg);
+                   break;
                }
-           } else {
-               enable_for_hw3ddlg (hDlg);
            }
+           break;
        }
-       updatedisplayarea ();
+       recursive--;
        break;
     case WM_HSCROLL:
-       currprefs.gfx_filter_horiz_zoom = workprefs.gfx_filter_horiz_zoom = SendMessage( GetDlgItem( hDlg, IDC_OPENGLHZ ), TBM_GETPOS, 0, 0 );
-       currprefs.gfx_filter_vert_zoom = workprefs.gfx_filter_vert_zoom = SendMessage( GetDlgItem( hDlg, IDC_OPENGLVZ ), TBM_GETPOS, 0, 0 );
-       currprefs.gfx_filter_horiz_offset = workprefs.gfx_filter_horiz_offset = SendMessage( GetDlgItem( hDlg, IDC_OPENGLHO ), TBM_GETPOS, 0, 0 );
-       currprefs.gfx_filter_vert_offset = workprefs.gfx_filter_vert_offset = SendMessage( GetDlgItem( hDlg, IDC_OPENGLVO ), TBM_GETPOS, 0, 0 );
-       currprefs.gfx_filter_scanlines = workprefs.gfx_filter_scanlines = SendMessage( GetDlgItem( hDlg, IDC_OPENGLSL ), TBM_GETPOS, 0, 0 );
-       currprefs.gfx_filter_scanlinelevel = workprefs.gfx_filter_scanlinelevel = SendMessage( GetDlgItem( hDlg, IDC_OPENGLSL2 ), TBM_GETPOS, 0, 0 );
-       SetDlgItemInt( hDlg, IDC_OPENGLHZV, workprefs.gfx_filter_horiz_zoom, TRUE );
-       SetDlgItemInt( hDlg, IDC_OPENGLVZV, workprefs.gfx_filter_vert_zoom, TRUE );
-       SetDlgItemInt( hDlg, IDC_OPENGLHOV, workprefs.gfx_filter_horiz_offset, TRUE );
-        SetDlgItemInt( hDlg, IDC_OPENGLVOV, workprefs.gfx_filter_vert_offset, TRUE );
-        SetDlgItemInt( hDlg, IDC_OPENGLSLV, workprefs.gfx_filter_scanlines, TRUE );
-       SetDlgItemInt( hDlg, IDC_OPENGLSL2V, workprefs.gfx_filter_scanlinelevel, TRUE );
+       currprefs.gfx_filter_horiz_zoom = workprefs.gfx_filter_horiz_zoom = SendMessage( GetDlgItem( hDlg, IDC_FILTERHZ ), TBM_GETPOS, 0, 0 );
+       currprefs.gfx_filter_vert_zoom = workprefs.gfx_filter_vert_zoom = SendMessage( GetDlgItem( hDlg, IDC_FILTERVZ ), TBM_GETPOS, 0, 0 );
+       currprefs.gfx_filter_horiz_offset = workprefs.gfx_filter_horiz_offset = SendMessage( GetDlgItem( hDlg, IDC_FILTERHO ), TBM_GETPOS, 0, 0 );
+       currprefs.gfx_filter_vert_offset = workprefs.gfx_filter_vert_offset = SendMessage( GetDlgItem( hDlg, IDC_FILTERVO ), TBM_GETPOS, 0, 0 );
+       currprefs.gfx_filter_scanlines = workprefs.gfx_filter_scanlines = SendMessage( GetDlgItem( hDlg, IDC_FILTERSL ), TBM_GETPOS, 0, 0 );
+       currprefs.gfx_filter_scanlinelevel = workprefs.gfx_filter_scanlinelevel = SendMessage( GetDlgItem( hDlg, IDC_FILTERSL2 ), TBM_GETPOS, 0, 0 );
+       SetDlgItemInt (hDlg, IDC_FILTERHZV, workprefs.gfx_filter_horiz_zoom, TRUE);
+       SetDlgItemInt (hDlg, IDC_FILTERVZV, workprefs.gfx_filter_vert_zoom, TRUE);
+       SetDlgItemInt (hDlg, IDC_FILTERHOV, workprefs.gfx_filter_horiz_offset, TRUE);
+        SetDlgItemInt (hDlg, IDC_FILTERVOV, workprefs.gfx_filter_vert_offset, TRUE);
+        SetDlgItemInt (hDlg, IDC_FILTERSLV, workprefs.gfx_filter_scanlines, TRUE);
+       SetDlgItemInt (hDlg, IDC_FILTERSL2V, workprefs.gfx_filter_scanlinelevel, TRUE);
        updatedisplayarea ();
        WIN32GFX_WindowMove ();
        break;
@@ -6496,6 +6665,10 @@ static BOOL CALLBACK AVIOutputDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
                SendDlgItemMessage(hDlg, IDC_AVIOUTPUT_FPS, TBM_SETRANGE, TRUE, MAKELONG(1, VBLANK_HZ_NTSC));
                SendDlgItemMessage(hDlg, IDC_AVIOUTPUT_FPS, TBM_SETPOS, TRUE, VBLANK_HZ_PAL);
                SendMessage(hDlg, WM_HSCROLL, (WPARAM) NULL, (LPARAM) NULL);
+               if (!avioutput_filename[0]) {
+                   fetch_path ("VideoPath", avioutput_filename, sizeof (avioutput_filename));
+                   strcat (avioutput_filename, "output.avi");
+               }
                
        case WM_USER:
                recursive++;
@@ -6894,7 +7067,7 @@ int dragdrop (HWND hDlg, HDROP hd, struct uae_prefs *prefs, int currentpage)
                    strcpy (prefs->flashfile, file);
                break;
                case ZFILE_CONFIGURATION:
-                   if (cfgfile_doload (&workprefs, file, 0)) {
+                   if (target_cfgfile_load (&workprefs, file, 0)) {
                        if (full_property_sheet) {
                            inputdevice_updateconfig (&workprefs);
                            if (!workprefs.start_gui)
@@ -7033,7 +7206,7 @@ static int GetSettings (int all_options, HWND hwnd)
        CPU_ID = init_page (IDD_CPU, IDI_CPU, IDS_CPU, CPUDlgProc, "gui/cpu.htm");
        DISPLAY_ID = init_page (IDD_DISPLAY, IDI_DISPLAY, IDS_DISPLAY, DisplayDlgProc, "gui/display.htm");
 #if defined(OPENGL) || defined (D3D)
-       HW3D_ID = init_page (IDD_OPENGL, IDI_DISPLAY, IDS_OPENGL, hw3dDlgProc, "gui/opengl.htm");
+       HW3D_ID = init_page (IDD_FILTER, IDI_DISPLAY, IDS_FILTER, hw3dDlgProc, "gui/filter.htm");
 #endif
        CHIPSET_ID = init_page (IDD_CHIPSET, IDI_CPU, IDS_CHIPSET, ChipsetDlgProc, "gui/chipset.htm");
        SOUND_ID = init_page (IDD_SOUND, IDI_SOUND, IDS_SOUND, SoundDlgProc, "gui/sound.htm");