From: Toni Wilen Date: Sat, 26 Nov 2022 17:49:38 +0000 (+0200) Subject: Interlace filter updates X-Git-Tag: 41000~52 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=c681aa8aa4ea7937941732b84933504bd66884f0;p=francis%2Fwinuae.git Interlace filter updates --- diff --git a/custom.cpp b/custom.cpp index fd515230..3b87ed0d 100644 --- a/custom.cpp +++ b/custom.cpp @@ -14952,19 +14952,22 @@ void check_prefs_changed_custom(void) } #ifdef GFXFILTER - struct gfx_filterdata *fd = &currprefs.gf[0]; - struct gfx_filterdata *fdcp = &changed_prefs.gf[0]; - - fd->gfx_filter_horiz_zoom = fdcp->gfx_filter_horiz_zoom; - fd->gfx_filter_vert_zoom = fdcp->gfx_filter_vert_zoom; - fd->gfx_filter_horiz_offset = fdcp->gfx_filter_horiz_offset; - fd->gfx_filter_vert_offset = fdcp->gfx_filter_vert_offset; - fd->gfx_filter_scanlines = fdcp->gfx_filter_scanlines; - - fd->gfx_filter_left_border = fdcp->gfx_filter_left_border; - fd->gfx_filter_right_border = fdcp->gfx_filter_right_border; - fd->gfx_filter_top_border = fdcp->gfx_filter_top_border; - fd->gfx_filter_bottom_border = fdcp->gfx_filter_bottom_border; + for (int i = 0; i < 2; i++) { + int idx = i == 0 ? 0 : 2; + struct gfx_filterdata *fd = &currprefs.gf[idx]; + struct gfx_filterdata *fdcp = &changed_prefs.gf[idx]; + + fd->gfx_filter_horiz_zoom = fdcp->gfx_filter_horiz_zoom; + fd->gfx_filter_vert_zoom = fdcp->gfx_filter_vert_zoom; + fd->gfx_filter_horiz_offset = fdcp->gfx_filter_horiz_offset; + fd->gfx_filter_vert_offset = fdcp->gfx_filter_vert_offset; + fd->gfx_filter_scanlines = fdcp->gfx_filter_scanlines; + + fd->gfx_filter_left_border = fdcp->gfx_filter_left_border; + fd->gfx_filter_right_border = fdcp->gfx_filter_right_border; + fd->gfx_filter_top_border = fdcp->gfx_filter_top_border; + fd->gfx_filter_bottom_border = fdcp->gfx_filter_bottom_border; + } #endif } diff --git a/drawing.cpp b/drawing.cpp index aa0fd13d..1bbe7541 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -711,7 +711,8 @@ void get_custom_raw_limits(int *pw, int *ph, int *pdx, int *pdy) void check_custom_limits(void) { - struct gfx_filterdata *fd = &currprefs.gf[0]; + struct amigadisplay *ad = &adisplays[0]; + struct gfx_filterdata *fd = &currprefs.gf[ad->gf_index]; int vls = visible_left_start; int vrs = visible_right_stop; int vts = visible_top_start; @@ -741,7 +742,8 @@ void check_custom_limits(void) void set_custom_limits (int w, int h, int dx, int dy, bool blank) { - struct gfx_filterdata *fd = &currprefs.gf[0]; + struct amigadisplay *ad = &adisplays[0]; + struct gfx_filterdata *fd = &currprefs.gf[ad->gf_index]; int vls = visible_left_start; int vrs = visible_right_stop; int vts = visible_top_start; @@ -3934,6 +3936,7 @@ static void pfield_draw_line(struct vidbuffer *vb, int lineno, int gfx_ypos, int static void center_image (void) { struct amigadisplay *ad = &adisplays[0]; + struct gfx_filterdata *fd = &currprefs.gf[ad->gf_index]; struct vidbuf_description *vidinfo = &ad->gfxvidinfo; int prev_x_adjust = visible_left_border; int prev_y_adjust = thisframe_y_adjust; @@ -3942,7 +3945,7 @@ static void center_image (void) int ew = vidinfo->drawbuffer.extrawidth; int maxdiw = max_diwlastword; - if (currprefs.gfx_overscanmode <= OVERSCANMODE_OVERSCAN && currprefs.gfx_xcenter && !currprefs.gf[0].gfx_filter_autoscale && max_diwstop > 0) { + if (currprefs.gfx_overscanmode <= OVERSCANMODE_OVERSCAN && currprefs.gfx_xcenter && !fd->gfx_filter_autoscale && max_diwstop > 0) { if (max_diwstop - min_diwstart < w && currprefs.gfx_xcenter == 2) /* Try to center. */ @@ -4001,7 +4004,7 @@ static void center_image (void) max_drawn_amiga_line_tmp >>= linedbl; thisframe_y_adjust = minfirstline; - if (currprefs.gfx_ycenter && !currprefs.gf[0].gfx_filter_autoscale) { + if (currprefs.gfx_ycenter && !fd->gfx_filter_autoscale) { if (thisframe_first_drawn_line >= 0 && thisframe_last_drawn_line > thisframe_first_drawn_line) { @@ -4857,10 +4860,13 @@ void check_prefs_picasso(void) ad->picasso_requested_forced_on = false; ad->picasso_on = ad->picasso_requested_on; - if (!ad->picasso_on) + if (!ad->picasso_on) { clear_inhibit_frame(monid, IHF_PICASSO); - else + ad->gf_index = ad->interlace_on ? 2 : 1; + } else { set_inhibit_frame(monid, IHF_PICASSO); + ad->gf_index = 1; + } gfx_set_picasso_state(monid, ad->picasso_on); picasso_enablescreen(monid, ad->picasso_requested_on); @@ -5131,13 +5137,25 @@ bool notice_interlace_seen (int monid, bool lace) if (currprefs.gf[2].enable && memcmp(&currprefs.gf[0], &currprefs.gf[2], sizeof(struct gfx_filterdata))) { changed_prefs.gf[0].changed = true; changed_prefs.gf[2].changed = true; - ad->interlace_on = interlace_on; - set_config_changed(); + if (ad->interlace_on != interlace_on) { + ad->interlace_on = interlace_on; + set_config_changed(); + } } else { ad->interlace_on = false; } } + if (!ad->picasso_on) { + if (ad->interlace_on) { + ad->gf_index = 2; + } else { + ad->gf_index = 0; + } + } else { + ad->gf_index = 1; + } + return changed; } @@ -5251,6 +5269,7 @@ void drawing_init (void) if (!isrestore ()) { ad->picasso_on = 0; ad->picasso_requested_on = 0; + ad->gf_index = 0; gfx_set_picasso_state(0, 0); } #endif diff --git a/gfxutil.cpp b/gfxutil.cpp index 919dbbcb..121854f4 100644 --- a/gfxutil.cpp +++ b/gfxutil.cpp @@ -139,6 +139,7 @@ static int lf, hf; static void video_calc_gammatable(int monid) { struct amigadisplay *ad = &adisplays[monid]; + struct gfx_filterdata *fd = &currprefs.gf[ad->gf_index]; float bri, con, gam, gams[3]; float max = 255; @@ -156,7 +157,7 @@ static void video_calc_gammatable(int monid) gams[1] = gam + ((float)(1000 - currprefs.gfx_gamma_ch[1])) / 1000.0f; gams[2] = gam + ((float)(1000 - currprefs.gfx_gamma_ch[2])) / 1000.0f; - lf = 64 * currprefs.gf[ad->picasso_on].gfx_filter_blur / 1000; + lf = 64 * currprefs.gf[ad->gf_index].gfx_filter_blur / 1000; hf = 256 - lf * 2; for (int i = 0; i < (256 * 3); i++) { @@ -193,7 +194,7 @@ static uae_u32 limit256(int monid, float v) { struct amigadisplay *ad = &adisplays[monid]; if (!gfx_hdr) { - v = v * (float)(currprefs.gf[ad->picasso_on].gfx_filter_contrast + 1000) / 1000.0f + currprefs.gf[ad->picasso_on].gfx_filter_luminance / 10.0f; + v = v * (float)(currprefs.gf[ad->gf_index].gfx_filter_contrast + 1000) / 1000.0f + currprefs.gf[ad->gf_index].gfx_filter_luminance / 10.0f; } if (v < 0) v = 0; @@ -205,7 +206,7 @@ static uae_s32 limit256rb(int monid, float v) { struct amigadisplay *ad = &adisplays[monid]; if (!gfx_hdr) { - v *= (float)(currprefs.gf[ad->picasso_on].gfx_filter_saturation + 1000) / 1000.0f; + v *= (float)(currprefs.gf[ad->gf_index].gfx_filter_saturation + 1000) / 1000.0f; } if (v < -128) v = -128; diff --git a/include/xwin.h b/include/xwin.h index d28f6aa2..83f19cce 100644 --- a/include/xwin.h +++ b/include/xwin.h @@ -165,6 +165,7 @@ struct amigadisplay bool picasso_requested_forced_on; bool picasso_on; bool interlace_on; + int gf_index; int picasso_redraw_necessary; int custom_frame_redraw_necessary; int frame_redraw_necessary; diff --git a/od-win32/direct3d.cpp b/od-win32/direct3d.cpp index fbde1207..4650ed9c 100644 --- a/od-win32/direct3d.cpp +++ b/od-win32/direct3d.cpp @@ -2654,7 +2654,7 @@ static const TCHAR *D3D_init2 (struct d3dstruct *d3d, HWND ahwnd, int w_w, int w struct apmode ap; D3DADAPTER_IDENTIFIER9 did; - d3d->filterd3didx = ad->picasso_on ? 1 : (ad->interlace_on ? 2 : 0); + d3d->filterd3didx = ad->gf_index; d3d->filterd3d = &currprefs.gf[d3d->filterd3didx]; D3D_free2 (d3d); diff --git a/od-win32/direct3d11.cpp b/od-win32/direct3d11.cpp index bd3e171f..f4c3407d 100644 --- a/od-win32/direct3d11.cpp +++ b/od-win32/direct3d11.cpp @@ -3407,7 +3407,7 @@ static int xxD3D11_init2(HWND ahwnd, int monid, int w_w, int w_h, int t_w, int t write_log(_T("D3D11 init start. (%d*%d) (%d*%d) RTG=%d Depth=%d.\n"), w_w, w_h, t_w, t_h, ad->picasso_on, depth); - d3d->filterd3didx = ad->picasso_on ? 1 : (ad->interlace_on ? 2 : 0); + d3d->filterd3didx = ad->gf_index; d3d->filterd3d = &currprefs.gf[d3d->filterd3didx]; d3d->delayedfs = 0; diff --git a/od-win32/scaler_more.cpp b/od-win32/scaler_more.cpp index cb196a32..22314d23 100644 --- a/od-win32/scaler_more.cpp +++ b/od-win32/scaler_more.cpp @@ -41,8 +41,8 @@ void PAL_init(int monid) xx2 = 5; xx3 = 7; } - pal_noise_mask = (1 << (currprefs.gf[ad->picasso_on].gfx_filter_noise * 7 / 100)) - 1; - scanlinelevel = 128 - currprefs.gf[ad->picasso_on].gfx_filter_scanlines * 128 / 100; + pal_noise_mask = (1 << (currprefs.gf[ad->gf_index].gfx_filter_noise * 7 / 100)) - 1; + scanlinelevel = 128 - currprefs.gf[ad->gf_index].gfx_filter_scanlines * 128 / 100; } #if 0 diff --git a/od-win32/win32_scaler.cpp b/od-win32/win32_scaler.cpp index b0976dae..621d23fd 100644 --- a/od-win32/win32_scaler.cpp +++ b/od-win32/win32_scaler.cpp @@ -142,11 +142,10 @@ static void getmanualpos(int monid, int *cxp, int *cyp, int *cwp, int *chp) *chp = ch; } -static bool get_auto_aspect_ratio(int monid, int cw, int ch, int crealh, int scalemode, float *autoaspectratio) +static bool get_auto_aspect_ratio(int monid, int cw, int ch, int crealh, int scalemode, float *autoaspectratio, int idx) { - struct amigadisplay *ad = &adisplays[monid]; *autoaspectratio = 0; - if (currprefs.gf[ad->picasso_on].gfx_filter_keep_autoscale_aspect && cw > 0 && ch > 0 && crealh > 0 && (scalemode == AUTOSCALE_NORMAL || + if (currprefs.gf[idx].gfx_filter_keep_autoscale_aspect && cw > 0 && ch > 0 && crealh > 0 && (scalemode == AUTOSCALE_NORMAL || scalemode == AUTOSCALE_INTEGER_AUTOSCALE || scalemode == AUTOSCALE_MANUAL)) { float cw2 = (float)cw; float ch2 = (float)ch; @@ -255,17 +254,18 @@ void getfilterrect2(int monid, RECT *sr, RECT *dr, RECT *zr, int dst_width, int int extraw2; bool doautoaspect = false; float autoaspectratio; - int keep_aspect = currprefs.gf[ad->picasso_on].gfx_filter_keep_aspect; - int filter_aspect = currprefs.gf[ad->picasso_on].gfx_filter_aspect; + int idx = ad->gf_index; + int keep_aspect = currprefs.gf[idx].gfx_filter_keep_aspect; + int filter_aspect = currprefs.gf[idx].gfx_filter_aspect; int palntscadjust = 1; int autoselect = 0; - float filter_horiz_zoom = currprefs.gf[ad->picasso_on].gfx_filter_horiz_zoom / 1000.0f; - float filter_vert_zoom = currprefs.gf[ad->picasso_on].gfx_filter_vert_zoom / 1000.0f; - float filter_horiz_zoom_mult = currprefs.gf[ad->picasso_on].gfx_filter_horiz_zoom_mult; - float filter_vert_zoom_mult = currprefs.gf[ad->picasso_on].gfx_filter_vert_zoom_mult; - float filter_horiz_offset = currprefs.gf[ad->picasso_on].gfx_filter_horiz_offset / 10000.0f; - float filter_vert_offset = currprefs.gf[ad->picasso_on].gfx_filter_vert_offset / 10000.0f; + float filter_horiz_zoom = currprefs.gf[idx].gfx_filter_horiz_zoom / 1000.0f; + float filter_vert_zoom = currprefs.gf[idx].gfx_filter_vert_zoom / 1000.0f; + float filter_horiz_zoom_mult = currprefs.gf[idx].gfx_filter_horiz_zoom_mult; + float filter_vert_zoom_mult = currprefs.gf[idx].gfx_filter_vert_zoom_mult; + float filter_horiz_offset = currprefs.gf[idx].gfx_filter_horiz_offset / 10000.0f; + float filter_vert_offset = currprefs.gf[idx].gfx_filter_vert_offset / 10000.0f; store_custom_limits (-1, -1, -1, -1); *mode = 0; @@ -285,8 +285,8 @@ void getfilterrect2(int monid, RECT *sr, RECT *dr, RECT *zr, int dst_width, int aws = aw * scale; ahs = ah * scale; //write_log (_T("%d %d %d\n"), dst_width, temp_width, aws); - extraw = (int)(-aws * (filter_horiz_zoom - currprefs.gf[ad->picasso_on].gfx_filteroverlay_overscan * 10) / 2.0f); - extrah = (int)(-ahs * (filter_vert_zoom - currprefs.gf[ad->picasso_on].gfx_filteroverlay_overscan * 10) / 2.0f); + extraw = (int)(-aws * (filter_horiz_zoom - currprefs.gf[idx].gfx_filteroverlay_overscan * 10) / 2.0f); + extrah = (int)(-ahs * (filter_vert_zoom - currprefs.gf[idx].gfx_filteroverlay_overscan * 10) / 2.0f); extraw2 = 0; if (D3D_getscalerect && D3D_getscalerect(monid, &mrmx, &mrmy, &mrsx, &mrsy, avidinfo->outbuffer->inwidth2, avidinfo->outbuffer->inheight2)) { @@ -310,8 +310,8 @@ void getfilterrect2(int monid, RECT *sr, RECT *dr, RECT *zr, int dst_width, int float xmult = filter_horiz_zoom_mult; float ymult = filter_vert_zoom_mult; - int scalemode = currprefs.gf[ad->picasso_on].gfx_filter_autoscale; - int oscalemode = changed_prefs.gf[ad->picasso_on].gfx_filter_autoscale; + int scalemode = currprefs.gf[idx].gfx_filter_autoscale; + int oscalemode = changed_prefs.gf[idx].gfx_filter_autoscale; if (scalemode == AUTOSCALE_OVERSCAN_BLANK) { oscalemode = scalemode = AUTOSCALE_NONE; } @@ -401,8 +401,8 @@ void getfilterrect2(int monid, RECT *sr, RECT *dr, RECT *zr, int dst_width, int bool ok = true; if (currprefs.gfx_xcenter_pos >= 0 || currprefs.gfx_ycenter_pos >= 0) { - changed_prefs.gf[ad->picasso_on].gfx_filter_horiz_offset = currprefs.gf[ad->picasso_on].gfx_filter_horiz_offset = 0.0; - changed_prefs.gf[ad->picasso_on].gfx_filter_vert_offset = currprefs.gf[ad->picasso_on].gfx_filter_vert_offset = 0.0; + changed_prefs.gf[idx].gfx_filter_horiz_offset = currprefs.gf[idx].gfx_filter_horiz_offset = 0.0; + changed_prefs.gf[idx].gfx_filter_vert_offset = currprefs.gf[idx].gfx_filter_vert_offset = 0.0; filter_horiz_offset = 0.0; filter_vert_offset = 0.0; get_custom_topedge (&cx, &cy, false); @@ -447,7 +447,7 @@ void getfilterrect2(int monid, RECT *sr, RECT *dr, RECT *zr, int dst_width, int maxw = res_match(maxw); - float multadd = 1.0f / (1 << currprefs.gf[ad->picasso_on].gfx_filter_integerscalelimit); + float multadd = 1.0f / (1 << currprefs.gf[idx].gfx_filter_integerscalelimit); if (cw2 > maxw || ch2 > maxh) { while (cw2 / mult > maxw || ch2 / mult > maxh) mult += multadd; @@ -474,8 +474,8 @@ void getfilterrect2(int monid, RECT *sr, RECT *dr, RECT *zr, int dst_width, int } else if (scalemode == AUTOSCALE_MANUAL) { - changed_prefs.gf[ad->picasso_on].gfx_filter_horiz_offset = currprefs.gf[ad->picasso_on].gfx_filter_horiz_offset = 0.0; - changed_prefs.gf[ad->picasso_on].gfx_filter_vert_offset = currprefs.gf[ad->picasso_on].gfx_filter_vert_offset = 0.0; + changed_prefs.gf[idx].gfx_filter_horiz_offset = currprefs.gf[idx].gfx_filter_horiz_offset = 0.0; + changed_prefs.gf[idx].gfx_filter_vert_offset = currprefs.gf[idx].gfx_filter_vert_offset = 0.0; filter_horiz_offset = 0.0; filter_vert_offset = 0.0; @@ -523,7 +523,7 @@ void getfilterrect2(int monid, RECT *sr, RECT *dr, RECT *zr, int dst_width, int } if (!autoaspect_done) { - doautoaspect = get_auto_aspect_ratio(monid, cw, ch, crealh, scalemode, &autoaspectratio); + doautoaspect = get_auto_aspect_ratio(monid, cw, ch, crealh, scalemode, &autoaspectratio, idx); } if (cv) { @@ -545,7 +545,7 @@ void getfilterrect2(int monid, RECT *sr, RECT *dr, RECT *zr, int dst_width, int OffsetRect (zr, cx * scale - (dst_width - ww) / 2, cy * scale - (dst_height - hh) / 2); goto cont; - } else if (scalemode == AUTOSCALE_RESIZE && isfullscreen() == 0 && !currprefs.gf[ad->picasso_on].gfx_filteroverlay[0]) { + } else if (scalemode == AUTOSCALE_RESIZE && isfullscreen() == 0 && !currprefs.gf[idx].gfx_filteroverlay[0]) { static int lastresize = 0; static int lastdelay = 1; @@ -586,8 +586,8 @@ void getfilterrect2(int monid, RECT *sr, RECT *dr, RECT *zr, int dst_width, int lastresize = AUTORESIZE_FRAME_DELAY; lastdelay = 0; } - float scalex = currprefs.gf[ad->picasso_on].gfx_filter_horiz_zoom_mult > 0 ? currprefs.gf[ad->picasso_on].gfx_filter_horiz_zoom_mult : 1.0f; - float scaley = currprefs.gf[ad->picasso_on].gfx_filter_vert_zoom_mult > 0 ? currprefs.gf[ad->picasso_on].gfx_filter_vert_zoom_mult : 1.0f; + float scalex = currprefs.gf[idx].gfx_filter_horiz_zoom_mult > 0 ? currprefs.gf[idx].gfx_filter_horiz_zoom_mult : 1.0f; + float scaley = currprefs.gf[idx].gfx_filter_vert_zoom_mult > 0 ? currprefs.gf[idx].gfx_filter_vert_zoom_mult : 1.0f; SetRect (sr, 0, 0, (int)(cw * scale * scalex), (int)(ch * scale * scaley)); dr->left = (temp_width - aws) /2; dr->top = (temp_height - ahs) / 2; @@ -917,6 +917,7 @@ bool S2X_init(int monid, int dw, int dh, int dd) struct vidbuffer *vb = avidinfo->outbuffer; struct AmigaMonitor *mon = &AMonitors[monid]; struct uae_filter *usedfilter = mon->usedfilter; + int idx = ad->gf_index; int flags = 0; dst_width2 = dw; @@ -941,7 +942,7 @@ bool S2X_init(int monid, int dw, int dh, int dd) if (WIN32GFX_IsPicassoScreen(mon)) return true; - if (!currprefs.gf[ad->picasso_on].gfx_filter || !usedfilter) { + if (!currprefs.gf[idx].gfx_filter || !usedfilter) { usedfilter = &uaefilters[0]; scale = 1; } else { @@ -950,7 +951,7 @@ bool S2X_init(int monid, int dw, int dh, int dd) if ((amiga_depth2 == 16 && !(flags & UAE_FILTER_MODE_16)) || (amiga_depth2 == 32 && !(flags & UAE_FILTER_MODE_32))) { usedfilter = &uaefilters[0]; scale = 1; - changed_prefs.gf[ad->picasso_on].gfx_filter = usedfilter->type; + changed_prefs.gf[idx].gfx_filter = usedfilter->type; } } #if 0 @@ -969,11 +970,11 @@ bool S2X_init(int monid, int dw, int dh, int dd) amiga_height = vb->outheight; amiga_depth = vb->pixbytes * 8; - int mh = currprefs.gf[ad->picasso_on].gfx_filter_filtermodeh + 1; + int mh = currprefs.gf[idx].gfx_filter_filtermodeh + 1; if (mh < scale) mh = scale; temp_width = dst_width * mh; - int mv = currprefs.gf[ad->picasso_on].gfx_filter_filtermodev + 1; + int mv = currprefs.gf[idx].gfx_filter_filtermodev + 1; if (mv < scale) mv = scale; temp_height = dst_height * mv; @@ -995,6 +996,7 @@ void S2X_render(int monid, int y_start, int y_end) struct uae_filter *usedfilter = mon->usedfilter; struct vidbuf_description *avidinfo = &adisplays[monid].gfxvidinfo; struct vidbuffer *vb = avidinfo->outbuffer; + int idx = ad->gf_index; int aw, ah, aws, ahs; uae_u8 *dptr, *enddptr, *sptr, *endsptr; int ok = 0; @@ -1168,9 +1170,9 @@ void S2X_render(int monid, int y_start, int y_end) } - if (ok == 0 && currprefs.gf[ad->picasso_on].gfx_filter) { + if (ok == 0 && currprefs.gf[idx].gfx_filter) { usedfilter = &uaefilters[0]; - changed_prefs.gf[ad->picasso_on].gfx_filter = usedfilter->type; + changed_prefs.gf[idx].gfx_filter = usedfilter->type; } end:; } diff --git a/od-win32/win32gfx.cpp b/od-win32/win32gfx.cpp index dac544f5..1261a437 100644 --- a/od-win32/win32gfx.cpp +++ b/od-win32/win32gfx.cpp @@ -2149,6 +2149,11 @@ int check_prefs_changed_gfx(void) } } } + if (currprefs.gf[2].enable != changed_prefs.gf[2].enable) { + currprefs.gf[2].enable = changed_prefs.gf[2].enable; + c |= 512; + } + monitors[0] = true; #if 0 @@ -2461,7 +2466,9 @@ int check_prefs_changed_gfx(void) return 1; } - if (currprefs.gf[0].gfx_filter_autoscale != changed_prefs.gf[0].gfx_filter_autoscale || + if ( + currprefs.gf[0].gfx_filter_autoscale != changed_prefs.gf[0].gfx_filter_autoscale || + currprefs.gf[2].gfx_filter_autoscale != changed_prefs.gf[2].gfx_filter_autoscale || currprefs.gfx_xcenter_pos != changed_prefs.gfx_xcenter_pos || currprefs.gfx_ycenter_pos != changed_prefs.gfx_ycenter_pos || currprefs.gfx_xcenter_size != changed_prefs.gfx_xcenter_size || @@ -2476,6 +2483,7 @@ int check_prefs_changed_gfx(void) currprefs.gfx_xcenter = changed_prefs.gfx_xcenter; currprefs.gfx_ycenter = changed_prefs.gfx_ycenter; currprefs.gf[0].gfx_filter_autoscale = changed_prefs.gf[0].gfx_filter_autoscale; + currprefs.gf[2].gfx_filter_autoscale = changed_prefs.gf[2].gfx_filter_autoscale; get_custom_limits (NULL, NULL, NULL, NULL, NULL); fixup_prefs_dimensions (&changed_prefs); @@ -3057,10 +3065,10 @@ static void gfxmode_reset(int monid) #ifdef GFXFILTER *usedfilter = NULL; - if (currprefs.gf[ad->picasso_on].gfx_filter > 0) { + if (currprefs.gf[ad->gf_index].gfx_filter > 0) { int i = 0; while (uaefilters[i].name) { - if (uaefilters[i].type == currprefs.gf[ad->picasso_on].gfx_filter) { + if (uaefilters[i].type == currprefs.gf[ad->gf_index].gfx_filter) { *usedfilter = &uaefilters[i]; break; } @@ -3974,9 +3982,9 @@ retry: oldtex_w[i] = oldtex_h[i] = -1; } if (mon->currentmode.flags & DM_D3D) { - int fmh = mon->screen_is_picasso ? 1 : currprefs.gf[ad->picasso_on].gfx_filter_filtermodeh + 1; - int fmv = mon->screen_is_picasso ? 1 : currprefs.gf[ad->picasso_on].gfx_filter_filtermodev + 1 - 1; - if (currprefs.gf[ad->picasso_on].gfx_filter_filtermodev == 0) { + int fmh = mon->screen_is_picasso ? 1 : currprefs.gf[ad->gf_index].gfx_filter_filtermodeh + 1; + int fmv = mon->screen_is_picasso ? 1 : currprefs.gf[ad->gf_index].gfx_filter_filtermodev + 1 - 1; + if (currprefs.gf[ad->gf_index].gfx_filter_filtermodev == 0) { fmv = fmh; } int errv = 0; @@ -4014,7 +4022,7 @@ retry: } else if (currprefs.gfx_api > 0) { changed_prefs.gfx_api = currprefs.gfx_api = 0; changed_prefs.color_mode = currprefs.color_mode = 5; - changed_prefs.gf[ad->picasso_on].gfx_filter = currprefs.gf[ad->picasso_on].gfx_filter = 1; + changed_prefs.gf[ad->gf_index].gfx_filter = currprefs.gf[ad->gf_index].gfx_filter = 1; update_gfxparams(mon); d3d_select(&currprefs); error_log(_T("Direct3D9/11 failed to initialize ('%s'), falling back to GDI."), err);