From: Toni Wilen Date: Sat, 8 Mar 2025 15:04:58 +0000 (+0200) Subject: Remove software filter support X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=b4d32c36613a002c45ac4d2963d9995360e7fdf4;p=francis%2Fwinuae.git Remove software filter support --- diff --git a/cfgfile.cpp b/cfgfile.cpp index fbb29851..3f20c17b 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -2511,19 +2511,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type) d3dfound = true; } if (!d3dfound) { - if (gf->gfx_filter > 0) { - int i = 0; - struct uae_filter *uf; - while (uaefilters[i].name) { - uf = &uaefilters[i]; - if (uf->type == gf->gfx_filter) { - cfgfile_dwrite_str (f, _T("gfx_filter"), ext, uf->cfgname); - } - i++; - } - } else { - cfgfile_dwrite_ext (f, _T("gfx_filter"), ext, _T("no")); - } + cfgfile_dwrite_ext(f, _T("gfx_filter"), ext, _T("null")); } } cfgfile_dwrite_strarr(f, _T("gfx_filter_mode"), ext, filtermode2, gf->gfx_filter_filtermodeh); @@ -4159,14 +4147,7 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value) if (!p->gfx_api) p->gfx_api = 1; // forwards compatibiity } else { - int i = 0; - while(uaefilters[i].name) { - if (!_tcscmp (uaefilters[i].cfgname, value)) { - gf->gfx_filter = uaefilters[i].type; - break; - } - i++; - } + gf->gfx_filter = 0; } return 1; } diff --git a/gfxutil.cpp b/gfxutil.cpp index a24d5125..ff6e9a80 100644 --- a/gfxutil.cpp +++ b/gfxutil.cpp @@ -380,7 +380,7 @@ void alloc_colors_rgb (int rw, int gw, int bw, int rs, int gs, int bs, int aw, i } } -void alloc_colors64k(int monid, int rw, int gw, int bw, int rs, int gs, int bs, int aw, int as, int alpha, int byte_swap, bool yuv) +void alloc_colors64k(int monid, int rw, int gw, int bw, int rs, int gs, int bs, int aw, int as, int alpha, int byte_swap) { int bpp = rw + gw + bw + aw; int i, j; @@ -422,53 +422,8 @@ void alloc_colors64k(int monid, int rw, int gw, int bw, int rs, int gs, int bs, #if defined(AGA) || defined(GFXFILTER) alloc_colors_rgb (rw, gw, bw, rs, gs, bs, aw, as, alpha, byte_swap, xredcolors, xgreencolors, xbluecolors); -#ifdef GFXFILTER - if (yuv) { - /* create internal 5:6:5 color tables */ - for (i = 0; i < 256; i++) { - j = i + 256; - xredcolors[i] = doColor (gamma[j][0], 5, 11); - xgreencolors[i] = doColor (gamma[j][1], 6, 5); - xbluecolors[i] = doColor (gamma[j][2], 5, 0); - if (bpp <= 16) { - /* Fill upper 16 bits of each colour value with - * a copy of the colour. */ - xredcolors [i] = xredcolors [i] * 0x00010001; - xgreencolors[i] = xgreencolors[i] * 0x00010001; - xbluecolors [i] = xbluecolors [i] * 0x00010001; - } - } - for (i = 0; i < 4096; i++) { - int r = ((i >> 8) << 4) | (i >> 8); - int g = (((i >> 4) & 0xf) << 4) | ((i >> 4) & 0x0f); - int b = ((i & 0xf) << 4) | (i & 0x0f); - r = gamma[r + 256][0]; - g = gamma[g + 256][1]; - b = gamma[b + 256][2]; - - if (currprefs.gfx_blackerthanblack) { - r = (r * (255 - BLACKERTHANBLACKADJ) / 255) + BLACKERTHANBLACKADJ; - g = (g * (255 - BLACKERTHANBLACKADJ) / 255) + BLACKERTHANBLACKADJ; - b = (b * (255 - BLACKERTHANBLACKADJ) / 255) + BLACKERTHANBLACKADJ; - } - - xcolors[i] = doMask(r, 5, 11) | doMask(g, 6, 5) | doMask(b, 5, 0); - if (byte_swap) { - if (bpp <= 16) - xcolors[i] = do_byteswap_16(xcolors[i]); - else - xcolors[i] = do_byteswap_32(xcolors[i]); - } - if (bpp <= 16) { - /* Fill upper 16 bits of each colour value - * with a copy of the colour. */ - xcolors[i] |= xcolors[i] * 0x00010001; - } - } - } #endif -#endif xredcolor_b = rw; xgreencolor_b = gw; xbluecolor_b = bw; diff --git a/include/gfxfilter.h b/include/gfxfilter.h index 4a4a6e3e..0ef3f578 100644 --- a/include/gfxfilter.h +++ b/include/gfxfilter.h @@ -9,79 +9,6 @@ typedef unsigned char u8; typedef unsigned short u16; typedef unsigned long u32; -#if 0 -extern void S2X_refresh(int); -extern void S2X_render(int, int, int); -extern bool S2X_init (int, int dw, int dh, int dd); -extern void S2X_reset(int); -extern void S2X_free(int); -extern int S2X_getmult(int); - -extern void PAL_init(int monid); -extern void PAL_1x1_32 (uae_u32 *src, int pitchs, uae_u32 *trg, int pitcht, int width, int height); -extern void PAL_1x1_16 (uae_u16 *src, int pitchs, uae_u16 *trg, int pitcht, int width, int height); -#endif - -#ifndef __cplusplus -typedef int bool; -#endif - -#if 0 -extern "C" -{ - extern void S2X_configure(int, int rb, int gb, int bb, int rs, int gs, int bs); - extern int Init_2xSaI (int rb, int gb, int bb, int rs, int gs, int bs); - extern void Super2xSaI_16 (const uae_u8 *srcPtr, uae_u32 srcPitch, uae_u8 *dstPtr, uae_u32 dstPitch, int width, int height); - extern void Super2xSaI_32 (const uae_u8 *srcPtr, uae_u32 srcPitch, uae_u8 *dstPtr, uae_u32 dstPitch, int width, int height); - extern void SuperEagle_16 (const uae_u8 *srcPtr, uae_u32 srcPitch, uae_u8 *dstPtr, uae_u32 dstPitch, int width, int height); - extern void SuperEagle_32 (const uae_u8 *srcPtr, uae_u32 srcPitch, uae_u8 *dstPtr, uae_u32 dstPitch, int width, int height); - extern void _2xSaI_16 (const uae_u8 *srcPtr, uae_u32 srcPitch, uae_u8 *dstPtr, uae_u32 dstPitch, int width, int height); - extern void _2xSaI_32 (const uae_u8 *srcPtr, uae_u32 srcPitch, uae_u8 *dstPtr, uae_u32 dstPitch, int width, int height); - extern void AdMame2x (u8 *srcPtr, u32 srcPitch, /* u8 deltaPtr, */ - u8 *dstPtr, u32 dstPitch, int width, int height); - extern void AdMame2x32 (u8 *srcPtr, u32 srcPitch, /* u8 deltaPtr, */ - u8 *dstPtr, u32 dstPitch, int width, int height); - - extern void hq_init (int rb, int gb, int bb, int rs, int gs, int bs); - - extern void _cdecl hq2x_16 (unsigned char*, unsigned char*, DWORD, DWORD, DWORD); - extern void _cdecl hq2x_32 (unsigned char*, unsigned char*, DWORD, DWORD, DWORD); - extern void _cdecl hq3x_16 (unsigned char*, unsigned char*, DWORD, DWORD, DWORD); - extern void _cdecl hq3x_32 (unsigned char*, unsigned char*, DWORD, DWORD, DWORD); - extern void _cdecl hq4x_16 (unsigned char*, unsigned char*, DWORD, DWORD, DWORD); - extern void _cdecl hq4x_32 (unsigned char*, unsigned char*, DWORD, DWORD, DWORD); -} -#endif - -#define UAE_FILTER_NULL 1 -#define UAE_FILTER_SCALE2X 2 -#define UAE_FILTER_HQ2X 3 -#define UAE_FILTER_HQ3X 4 -#define UAE_FILTER_HQ4X 5 -#define UAE_FILTER_SUPEREAGLE 6 -#define UAE_FILTER_SUPER2XSAI 7 -#define UAE_FILTER_2XSAI 8 -#define UAE_FILTER_PAL 9 -#define UAE_FILTER_LAST 9 - -#if 0 -#define UAE_FILTER_MODE_16 16 -#define UAE_FILTER_MODE_16_16 16 -#define UAE_FILTER_MODE_16_32 (16 | 8) -#define UAE_FILTER_MODE_32 32 -#define UAE_FILTER_MODE_32_32 32 -#define UAE_FILTER_MODE_32_16 (32 | 8) -#endif - -struct uae_filter -{ - int type, yuv, intmul; - const TCHAR *name, *cfgname; - int flags; -}; - -extern struct uae_filter uaefilters[]; - void getfilterrect2(int monid, RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height, int aw, int ah, int scale, int *mode, int temp_width, int temp_height); void getfilteroffset(int monid, float *dx, float *dy, float *mx, float *my); diff --git a/include/xwin.h b/include/xwin.h index 0668e5ac..9d52964e 100644 --- a/include/xwin.h +++ b/include/xwin.h @@ -72,7 +72,7 @@ extern int bits_in_mask (unsigned long mask); extern int mask_shift (unsigned long mask); extern uae_u32 doMask (uae_u32 p, int bits, int shift); extern uae_u32 doMask256 (int p, int bits, int shift); -extern void alloc_colors64k (int monid, int, int, int, int, int, int, int, int, int, int, bool); +extern void alloc_colors64k (int monid, int, int, int, int, int, int, int, int, int, int); extern void alloc_colors_rgb (int rw, int gw, int bw, int rs, int gs, int bs, int aw, int as, int alpha, int byte_swap, uae_u32 *rc, uae_u32 *gc, uae_u32 *bc); extern void alloc_colors_picasso (int rw, int gw, int bw, int rs, int gs, int bs, int rgbfmt, uae_u32 *rgbx16); diff --git a/od-win32/render.h b/od-win32/render.h index 364650d3..8a80cbcf 100644 --- a/od-win32/render.h +++ b/od-win32/render.h @@ -100,7 +100,6 @@ struct AmigaMonitor { HBRUSH hStatusBkgB; struct winuae_currentmode currentmode; - struct uae_filter *usedfilter; }; extern struct AmigaMonitor *amon; extern struct AmigaMonitor AMonitors[MAX_AMIGAMONITORS]; diff --git a/od-win32/resources/resource.h b/od-win32/resources/resource.h index 254c324b..0128d0ae 100644 --- a/od-win32/resources/resource.h +++ b/od-win32/resources/resource.h @@ -430,7 +430,6 @@ #define IDS_BOARDID 435 #define IDS_ASSOCIATEEXTENSION 436 #define IDS_GAMEPORTS_CUSTOM 437 -#define IDS_FILTER_LABELS 438 #define IDS_CURRENT_HOST 439 #define IDS_NONE2 440 #define IDS_SOUND_CLONED71 441 diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index 59755930..4dfc54ed 100644 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -2242,7 +2242,6 @@ BEGIN IDS_BOARDID "ID" IDS_ASSOCIATEEXTENSION "Extension" IDS_GAMEPORTS_CUSTOM "Custom" - IDS_FILTER_LABELS "Null\nScale2X\nhq2x\nhq3x\nhq4x\nSuperEagle\nSuper2xSaI\n2xSaI\nPAL\n" IDS_CURRENT_HOST "Current host configuration" IDS_NONE2 "" IDS_SOUND_CLONED71 "Cloned stereo (7.1)" diff --git a/od-win32/rp.cpp b/od-win32/rp.cpp index cf0c682e..e803cd46 100644 --- a/od-win32/rp.cpp +++ b/od-win32/rp.cpp @@ -700,7 +700,6 @@ static void fixup_size (struct uae_prefs *prefs) if (prefs->gf[0].gfx_filter) { if (prefs->gf[0].gfx_filter_horiz_zoom_mult) hres += (int)prefs->gf[0].gfx_filter_horiz_zoom_mult - 1; - hres += uaefilters[prefs->gf[0].gfx_filter].intmul - 1; } if (hres > max_horiz_dbl) hres = max_horiz_dbl; @@ -712,7 +711,6 @@ static void fixup_size (struct uae_prefs *prefs) if (prefs->gf[0].gfx_filter) { if (prefs->gf[0].gfx_filter_vert_zoom_mult) vres += (int)prefs->gf[0].gfx_filter_vert_zoom_mult - 1; - vres += uaefilters[prefs->gf[0].gfx_filter].intmul - 1; } if (vres > max_vert_dbl) vres = max_vert_dbl; @@ -1880,10 +1878,6 @@ void rp_fixup_options (struct uae_prefs *p) changed_prefs.win32_borderless = currprefs.win32_borderless = 1; rp_filter_default = rp_filter = currprefs.gf[0].gfx_filter; - if (rp_filter == 0) { - rp_filter = UAE_FILTER_NULL; - changed_prefs.gf[0].gfx_filter = currprefs.gf[0].gfx_filter = rp_filter; - } fixup_size (p); get_screenmode (&sm, p, false); diff --git a/od-win32/win32_scaler.cpp b/od-win32/win32_scaler.cpp index 2892dc55..8c16d5e5 100644 --- a/od-win32/win32_scaler.cpp +++ b/od-win32/win32_scaler.cpp @@ -19,38 +19,12 @@ #define AUTORESIZE_FRAME_DELAY 10 -struct uae_filter uaefilters[] = -{ -#if 0 - { UAE_FILTER_NULL, 0, 1, _T("-"), _T("null"), UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_32_32 }, - - { UAE_FILTER_SCALE2X, 0, 2, _T("Scale2X"), _T("scale2x"), UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_32_32 }, - - { UAE_FILTER_HQ2X, 0, 2, _T("hq2x"), _T("hq2x"), UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_16_32, }, - - { UAE_FILTER_HQ3X, 0, 3, _T("hq3x"), _T("hq3x"), UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_16_32 }, - - { UAE_FILTER_HQ4X, 0, 4, _T("hq4x"), _T("hq4x"), UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_16_32 }, - - { UAE_FILTER_SUPEREAGLE, 0, 2, _T("SuperEagle"), _T("supereagle"), UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_16_32 }, - - { UAE_FILTER_SUPER2XSAI, 0, 2, _T("Super2xSaI"), _T("super2xsai"), UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_16_32 }, - - { UAE_FILTER_2XSAI, 0, 2, _T("2xSaI"), _T("2xsai"), UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_16_32 }, - - { UAE_FILTER_PAL, 1, 1, _T("PAL"), _T("pal"), UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_32_32 }, -#endif - { 0 } -}; - static float filteroffsetx, filteroffsety, filterxmult = 1.0, filterymult = 1.0; static int dst_width, dst_height, amiga_width, amiga_height, amiga_depth, dst_depth, scale; static int dst_width2, dst_height2, amiga_width2, amiga_height2, amiga_depth2, dst_depth2; static int temp_width, temp_height; uae_u8 *bufmem_ptr; static uae_u8 *tempsurf2, *tempsurf3; -static int cleartemp; -static uae_u32 rc[256], gc[256], bc[256]; static int deskw, deskh; static bool inited; @@ -234,7 +208,6 @@ void getfilterrect2(int monid, RECT *sr, RECT *dr, RECT *zr, int dst_width, int struct AmigaMonitor *mon = &AMonitors[monid]; struct amigadisplay *ad = &adisplays[monid]; struct vidbuf_description *avidinfo = &adisplays[monid].gfxvidinfo; - struct uae_filter *usedfilter = mon->usedfilter; struct monconfig *gmc = &currprefs.gfx_monitor[mon->monitor_id]; struct monconfig *gmh = &changed_prefs.gfx_monitor[mon->monitor_id]; float srcratio, dstratio; @@ -839,13 +812,10 @@ void freefilterbuffer(int monid, uae_u8 *buf) struct AmigaMonitor *mon = &AMonitors[monid]; struct vidbuf_description *avidinfo = &adisplays[monid].gfxvidinfo; struct vidbuffer *vb = avidinfo->outbuffer; - struct uae_filter *usedfilter = mon->usedfilter; if (!vb) return; - if (usedfilter == NULL) { - unlockscr3d(vb); - } + unlockscr3d(vb); } uae_u8 *getfilterbuffer(int monid, int *widthp, int *heightp, int *pitch, int *depth) @@ -853,7 +823,6 @@ uae_u8 *getfilterbuffer(int monid, int *widthp, int *heightp, int *pitch, int *d struct AmigaMonitor *mon = &AMonitors[monid]; struct vidbuf_description *avidinfo = &adisplays[monid].gfxvidinfo; struct vidbuffer *vb = avidinfo->outbuffer; - struct uae_filter *usedfilter = mon->usedfilter; int w, h; *widthp = 0; @@ -861,10 +830,8 @@ uae_u8 *getfilterbuffer(int monid, int *widthp, int *heightp, int *pitch, int *d *depth = amiga_depth; if (!vb) return NULL; - if (usedfilter == NULL) { - if (!lockscr3d(vb)) { - return NULL; - } + if (!lockscr3d(vb)) { + return NULL; } w = vb->outwidth; h = vb->outheight; diff --git a/od-win32/win32gfx.cpp b/od-win32/win32gfx.cpp index 206ec623..7766d80b 100644 --- a/od-win32/win32gfx.cpp +++ b/od-win32/win32gfx.cpp @@ -574,14 +574,11 @@ const TCHAR *target_get_display_name (int num, bool friendlyname) void centerdstrect(struct AmigaMonitor *mon, RECT *dr) { - struct uae_filter *usedfilter = mon->usedfilter; if(!(mon->currentmode.flags & (DM_DX_FULLSCREEN | DM_D3D_FULLSCREEN | DM_W_FULLSCREEN))) OffsetRect (dr, mon->amigawin_rect.left, mon->amigawin_rect.top); if (mon->currentmode.flags & DM_W_FULLSCREEN) { if (mon->scalepicasso && mon->screen_is_picasso) return; - if (usedfilter && !mon->screen_is_picasso) - return; if (mon->currentmode.fullfill && (mon->currentmode.current_width > mon->currentmode.native_width || mon->currentmode.current_height > mon->currentmode.native_height)) return; OffsetRect (dr, (mon->currentmode.native_width - mon->currentmode.current_width) / 2, @@ -596,7 +593,6 @@ void getgfxoffset(int monid, float *dxp, float *dyp, float *mxp, float *myp) { struct AmigaMonitor *mon = &AMonitors[monid]; struct amigadisplay *ad = &adisplays[monid]; - struct uae_filter *usedfilter = mon->usedfilter; float dx, dy, mx, my; getfilteroffset(monid, &dx, &dy, &mx, &my); @@ -613,8 +609,6 @@ void getgfxoffset(int monid, float *dxp, float *dyp, float *mxp, float *myp) for (;;) { if (mon->scalepicasso && mon->screen_is_picasso) break; - if (usedfilter && !mon->screen_is_picasso) - break; if (mon->currentmode.fullfill && (mon->currentmode.current_width > mon->currentmode.native_width || mon->currentmode.current_height > mon->currentmode.native_height)) break; dx += (mon->currentmode.native_width - mon->currentmode.current_width) / 2; @@ -1795,7 +1789,6 @@ static bool canmatchdepth(void) static void updatemodes(struct AmigaMonitor *mon) { - struct uae_filter *usedfilter = mon->usedfilter; DWORD flags = 0; mon->currentmode.fullfill = 0; @@ -2659,11 +2652,8 @@ void init_colors(int monid) } } } - alloc_colors64k(monid, red_bits, green_bits, blue_bits, red_shift,green_shift, blue_shift, alpha_bits, alpha_shift, alpha, 0, mon->usedfilter && mon->usedfilter->yuv); + alloc_colors64k(monid, red_bits, green_bits, blue_bits, red_shift,green_shift, blue_shift, alpha_bits, alpha_shift, alpha, 0); notice_new_xcolors (); -#if 0 - S2X_configure(monid, red_bits, green_bits, blue_bits, red_shift,green_shift, blue_shift); -#endif #ifdef AVIOUTPUT AVIOutput_RGBinfo (red_bits, green_bits, blue_bits, alpha_bits, red_shift, green_shift, blue_shift, alpha_shift); #endif @@ -3075,21 +3065,6 @@ void gfx_set_picasso_colors(int monid, RGBFTYPE rgbfmt) static void gfxmode_reset(int monid) { struct amigadisplay *ad = &adisplays[monid]; - struct uae_filter **usedfilter = &AMonitors[monid].usedfilter; - -#ifdef GFXFILTER - *usedfilter = NULL; - if (currprefs.gf[ad->gf_index].gfx_filter > 0) { - int i = 0; - while (uaefilters[i].name) { - if (uaefilters[i].type == currprefs.gf[ad->gf_index].gfx_filter) { - *usedfilter = &uaefilters[i]; - break; - } - i++; - } - } -#endif } int machdep_init(void) @@ -3947,7 +3922,6 @@ retry: break; } else { #endif - struct uae_filter *usedfilter = mon->usedfilter; mon->currentmode.native_depth = mon->currentmode.current_depth; if (currprefs.gfx_resolution > avidinfo->gfx_resolution_reserved) @@ -4003,7 +3977,6 @@ retry: avidinfo->drawbuffer.realbufmem = NULL; avidinfo->drawbuffer.bufmem = NULL; avidinfo->drawbuffer.bufmem_allocated = NULL; - avidinfo->drawbuffer.bufmem_lockable = false; avidinfo->outbuffer = &avidinfo->drawbuffer; @@ -4021,7 +3994,6 @@ retry: avidinfo->inbuffer = &avidinfo->tempbuffer; } - //init_row_map (); } #if 0 @@ -4138,8 +4110,6 @@ bool target_graphics_buffer_update(int monid, bool force) w = state->Width; h = state->Height; } else { - //struct vidbuffer *vb = avidinfo->drawbuffer.tempbufferinuse ? &avidinfo->tempbuffer : &avidinfo->drawbuffer; - //avidinfo->outbuffer = vb; struct vidbuffer *vb = avidinfo->inbuffer; if (!vb) { return false; diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 61e6a4ca..021a64fe 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -20446,26 +20446,7 @@ static void enable_for_hw3ddlg (HWND hDlg) int scalemode = workprefs.gf[filter_nativertg].gfx_filter_autoscale; int vv = FALSE, vv2 = FALSE, vv3 = FALSE, vv4 = FALSE; int as = FALSE; - struct uae_filter *uf; - int i, isfilter; - isfilter = 0; - uf = &uaefilters[0]; - i = 0; - while (uaefilters[i].name) { - if (workprefs.gf[filter_nativertg].gfx_filter == uaefilters[i].type) { - uf = &uaefilters[i]; - isfilter = 1; - break; - } - i++; - } - if (v && uf->intmul) { - vv = TRUE; - } - if (v && uf->yuv) { - vv2 = TRUE; - } v = vv = vv2 = vv3 = vv4 = TRUE; if (filter_nativertg == 1) { vv4 = FALSE; @@ -20627,8 +20608,8 @@ struct filterpreset { }; static const struct filterpreset filterpresets[] = { - { _T("D3D Autoscale"), UAE_FILTER_NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 4, 0, 0 }, - { _T("D3D Full Scaling"), UAE_FILTER_NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0 }, + { _T("D3D Autoscale"), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 4, 0, 0 }, + { _T("D3D Full Scaling"), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0 }, { NULL } }; @@ -20681,9 +20662,8 @@ static void setfiltermult (HWND hDlg) static void values_to_hw3ddlg (HWND hDlg, bool initdialog) { - TCHAR txt[200], tmp[200], tmp2[200]; + TCHAR txt[200], tmp[200]; int i, j, fltnum; - struct uae_filter *uf; int fxidx, fxcnt; UAEREG *fkey; @@ -20806,39 +20786,10 @@ static void values_to_hw3ddlg (HWND hDlg, bool initdialog) xSendDlgItemMessage (hDlg, IDC_FILTERMODE, CB_RESETCONTENT, 0, 0L); WIN32GUI_LoadUIString (IDS_NONE, tmp, sizeof(tmp) / sizeof(TCHAR)); - xSendDlgItemMessage (hDlg, IDC_FILTERMODE, CB_ADDSTRING, 0, (LPARAM)tmp); - WIN32GUI_LoadUIString(IDS_FILTER_LABELS, tmp2, sizeof(tmp2) / sizeof(TCHAR)); - uf = NULL; fltnum = 0; - i = 0; j = 1; - TCHAR *fl = tmp2; - while (uaefilters[i].name) { - if (filter_nativertg >= 2 && uaefilters[i].type > 1) { - i++; - while(*fl != '\n' && *fl != 0) { - fl++; - } - continue; - } - TCHAR *fle = fl; - while (*fle != '\n' && *fle != 0) { - fle++; - } - TCHAR endch = *fle; - *fle = 0; - xSendDlgItemMessage (hDlg, IDC_FILTERMODE, CB_ADDSTRING, 0, (LPARAM)fl); - if (uaefilters[i].type == workprefs.gf[filter_nativertg].gfx_filter) { - uf = &uaefilters[i]; - fltnum = j; - } - fl = fle; - if (endch != 0) { - fl++; - } - j++; - i++; - } + xSendDlgItemMessage(hDlg, IDC_FILTERMODE, CB_ADDSTRING, 0, (LPARAM)tmp); + j = 1; if (workprefs.gfx_api && D3D_canshaders ()) { bool gotit = false; HANDLE h; @@ -20864,10 +20815,6 @@ static void values_to_hw3ddlg (HWND hDlg, bool initdialog) h = INVALID_HANDLE_VALUE; } } - for (int i = 1; i < 2 * MAX_FILTERSHADERS; i++) { - if (workprefs.gf[filter_nativertg].gfx_filtershader[i][0] && !gotit) - fltnum = UAE_FILTER_NULL; - } } if (workprefs.gfx_api) { static int old_overlaytype = -1; @@ -20943,10 +20890,6 @@ static void values_to_hw3ddlg (HWND hDlg, bool initdialog) filtermodenum++; } } - if (uf && uf->yuv) { - filter_extra[fxidx++] = filter_pal_extra; - filter_extra[fxidx] = NULL; - } xSendDlgItemMessage (hDlg, IDC_FILTERXL, TBM_SETRANGE, TRUE, MAKELONG ( 0, +1000)); xSendDlgItemMessage (hDlg, IDC_FILTERXL, TBM_SETPAGESIZE, 0, 1); if (filter_extra[0]) { @@ -21196,13 +21139,8 @@ static void filter_handle (HWND hDlg) if (item2 != CB_ERR) workprefs.gf[filter_nativertg].gfx_filter_filtermodev = (int)item2; if (item > 0) { - if (item > UAE_FILTER_LAST) { - _stprintf (workprefs.gf[filter_nativertg].gfx_filtershader[filterstackpos], _T("%s.fx"), tmp + 5); - cfgfile_get_shader_config(&workprefs, full_property_sheet ? 0 : filter_nativertg); - } else { - item--; - workprefs.gf[filter_nativertg].gfx_filter = uaefilters[item].type; - } + _stprintf (workprefs.gf[filter_nativertg].gfx_filtershader[filterstackpos], _T("%s.fx"), tmp + 5); + cfgfile_get_shader_config(&workprefs, full_property_sheet ? 0 : filter_nativertg); if (of != workprefs.gf[filter_nativertg].gfx_filter || offh != workprefs.gf[filter_nativertg].gfx_filter_filtermodeh || offv != workprefs.gf[filter_nativertg].gfx_filter_filtermodev) { @@ -21212,7 +21150,7 @@ static void filter_handle (HWND hDlg) } for (int i = 1; i < MAX_FILTERSHADERS; i++) { if (workprefs.gf[filter_nativertg].gfx_filtershader[i][0]) - workprefs.gf[filter_nativertg].gfx_filter = UAE_FILTER_NULL; + workprefs.gf[filter_nativertg].gfx_filter = 0; } }