if (!ad->picasso_on) {
clear_inhibit_frame(monid, IHF_PICASSO);
- ad->gf_index = ad->interlace_on ? 2 : 1;
+ ad->gf_index = ad->interlace_on ? GF_INTERLACE : GF_NORMAL;
} else {
set_inhibit_frame(monid, IHF_PICASSO);
- ad->gf_index = 1;
+ ad->gf_index = GF_RTG;
}
gfx_set_picasso_state(monid, ad->picasso_on);
}
if (changed) {
- 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;
+ if (currprefs.gf[GF_INTERLACE].enable && memcmp(&currprefs.gf[GF_NORMAL], &currprefs.gf[GF_INTERLACE], sizeof(struct gfx_filterdata))) {
+ changed_prefs.gf[GF_NORMAL].changed = true;
+ changed_prefs.gf[GF_INTERLACE].changed = true;
if (ad->interlace_on != interlace_on) {
ad->interlace_on = interlace_on;
set_config_changed();
if (!ad->picasso_on) {
if (ad->interlace_on) {
- ad->gf_index = 2;
+ ad->gf_index = GF_INTERLACE;
} else {
- ad->gf_index = 0;
+ ad->gf_index = GF_NORMAL;
}
} else {
- ad->gf_index = 1;
+ ad->gf_index = GF_RTG;
}
return changed;
if (!isrestore ()) {
ad->picasso_on = 0;
ad->picasso_requested_on = 0;
- ad->gf_index = 0;
+ ad->gf_index = GF_NORMAL;
gfx_set_picasso_state(0, 0);
}
#endif
struct picasso96_state_struct *state = &picasso96_state[mon->monitor_id];
int x = newcursor_x;
int y = newcursor_y;
- float mx = currprefs.gf[1].gfx_filter_horiz_zoom_mult;
- float my = currprefs.gf[1].gfx_filter_vert_zoom_mult;
+ float mx = currprefs.gf[GF_RTG].gfx_filter_horiz_zoom_mult;
+ float my = currprefs.gf[GF_RTG].gfx_filter_vert_zoom_mult;
int forced = 0;
if (!hwsprite)
}
if (D3D_setcursor) {
- if (currprefs.gf[1].gfx_filter_autoscale == RTG_MODE_CENTER) {
+ if (currprefs.gf[GF_RTG].gfx_filter_autoscale == RTG_MODE_CENTER) {
D3D_setcursor(mon->monitor_id, x, y, WIN32GFX_GetWidth(mon), WIN32GFX_GetHeight(mon), mx, my, cursorvisible, mon->scalepicasso == 2);
} else {
D3D_setcursor(mon->monitor_id, x, y, state->Width, state->Height, mx, my, cursorvisible, false);
if (!ad->picasso_on)
return;
- if (currprefs.gf[1].gfx_filter_horiz_zoom_mult > 0) {
- picasso_offset_mx *= currprefs.gf[1].gfx_filter_horiz_zoom_mult;
+ if (currprefs.gf[GF_RTG].gfx_filter_horiz_zoom_mult > 0) {
+ picasso_offset_mx *= currprefs.gf[GF_RTG].gfx_filter_horiz_zoom_mult;
}
- if (currprefs.gf[1].gfx_filter_vert_zoom_mult > 0) {
- picasso_offset_my *= currprefs.gf[1].gfx_filter_vert_zoom_mult;
+ if (currprefs.gf[GF_RTG].gfx_filter_vert_zoom_mult > 0) {
+ picasso_offset_my *= currprefs.gf[GF_RTG].gfx_filter_vert_zoom_mult;
}
if (!mon->scalepicasso)
if (mon->screen_is_picasso) {
float mx = 1.0;
float my = 1.0;
- if (currprefs.gf[1].gfx_filter_horiz_zoom_mult > 0) {
- mx *= currprefs.gf[1].gfx_filter_horiz_zoom_mult;
+ if (currprefs.gf[GF_RTG].gfx_filter_horiz_zoom_mult > 0) {
+ mx *= currprefs.gf[GF_RTG].gfx_filter_horiz_zoom_mult;
}
- if (currprefs.gf[1].gfx_filter_vert_zoom_mult > 0) {
- my *= currprefs.gf[1].gfx_filter_vert_zoom_mult;
+ if (currprefs.gf[GF_RTG].gfx_filter_vert_zoom_mult > 0) {
+ my *= currprefs.gf[GF_RTG].gfx_filter_vert_zoom_mult;
}
mon->currentmode.current_width = (int)(state->Width * currprefs.rtg_horiz_zoom_mult * mx);
mon->currentmode.current_height = (int)(state->Height * currprefs.rtg_vert_zoom_mult * my);
if (mon->screen_is_picasso) {
bool diff = state->Width != mon->currentmode.native_width || state->Height != mon->currentmode.native_height;
if (isfullscreen () < 0) {
- if ((currprefs.gf[1].gfx_filter_autoscale == RTG_MODE_CENTER || currprefs.gf[1].gfx_filter_autoscale == RTG_MODE_SCALE || currprefs.win32_rtgallowscaling) && diff) {
+ if ((currprefs.gf[GF_RTG].gfx_filter_autoscale == RTG_MODE_CENTER || currprefs.gf[GF_RTG].gfx_filter_autoscale == RTG_MODE_SCALE || currprefs.win32_rtgallowscaling) && diff) {
mon->scalepicasso = RTG_MODE_SCALE;
}
- if (currprefs.gf[1].gfx_filter_autoscale == RTG_MODE_INTEGER_SCALE && diff) {
+ if (currprefs.gf[GF_RTG].gfx_filter_autoscale == RTG_MODE_INTEGER_SCALE && diff) {
mon->scalepicasso = RTG_MODE_INTEGER_SCALE;
}
- if (currprefs.gf[1].gfx_filter_autoscale == RTG_MODE_CENTER && diff) {
- mon->scalepicasso = currprefs.gf[1].gfx_filter_autoscale;
+ if (currprefs.gf[GF_RTG].gfx_filter_autoscale == RTG_MODE_CENTER && diff) {
+ mon->scalepicasso = currprefs.gf[GF_RTG].gfx_filter_autoscale;
}
if (!mon->scalepicasso && currprefs.win32_rtgscaleaspectratio) {
mon->scalepicasso = -1;
} else if (isfullscreen () > 0) {
if (!canmatchdepth()) { // can't scale to different color depth
if (mon->currentmode.native_width > state->Width && mon->currentmode.native_height > state->Height) {
- if (currprefs.gf[1].gfx_filter_autoscale)
+ if (currprefs.gf[GF_RTG].gfx_filter_autoscale)
mon->scalepicasso = RTG_MODE_SCALE;
- if (currprefs.gf[1].gfx_filter_autoscale == RTG_MODE_INTEGER_SCALE) {
+ if (currprefs.gf[GF_RTG].gfx_filter_autoscale == RTG_MODE_INTEGER_SCALE) {
mon->scalepicasso = RTG_MODE_INTEGER_SCALE;
}
}
- if (currprefs.gf[1].gfx_filter_autoscale == RTG_MODE_CENTER)
- mon->scalepicasso = currprefs.gf[1].gfx_filter_autoscale;
+ if (currprefs.gf[GF_RTG].gfx_filter_autoscale == RTG_MODE_CENTER)
+ mon->scalepicasso = currprefs.gf[GF_RTG].gfx_filter_autoscale;
if (!mon->scalepicasso && currprefs.win32_rtgscaleaspectratio)
mon->scalepicasso = -1;
}
} else if (isfullscreen () == 0) {
- if (currprefs.gf[1].gfx_filter_autoscale == RTG_MODE_INTEGER_SCALE) {
+ if (currprefs.gf[GF_RTG].gfx_filter_autoscale == RTG_MODE_INTEGER_SCALE) {
mon->scalepicasso = RTG_MODE_INTEGER_SCALE;
mon->currentmode.current_width = currprefs.gfx_monitor[mon->monitor_id].gfx_size.width;
mon->currentmode.current_height = currprefs.gfx_monitor[mon->monitor_id].gfx_size.height;
- } else if (currprefs.gf[1].gfx_filter_autoscale == RTG_MODE_CENTER) {
+ } else if (currprefs.gf[GF_RTG].gfx_filter_autoscale == RTG_MODE_CENTER) {
if (currprefs.gfx_monitor[mon->monitor_id].gfx_size.width < state->Width || currprefs.gfx_monitor[mon->monitor_id].gfx_size.height < state->Height) {
if (!currprefs.win32_rtgallowscaling) {
;
mon->currentmode.current_width = currprefs.gfx_monitor[mon->monitor_id].gfx_size.width;
mon->currentmode.current_height = currprefs.gfx_monitor[mon->monitor_id].gfx_size.height;
}
- } else if (currprefs.gf[1].gfx_filter_autoscale == RTG_MODE_SCALE) {
+ } else if (currprefs.gf[GF_RTG].gfx_filter_autoscale == RTG_MODE_SCALE) {
if (currprefs.gfx_monitor[mon->monitor_id].gfx_size.width > state->Width || currprefs.gfx_monitor[mon->monitor_id].gfx_size.height > state->Height)
mon->scalepicasso = RTG_MODE_SCALE;
if ((currprefs.gfx_monitor[mon->monitor_id].gfx_size.width != state->Width || currprefs.gfx_monitor[mon->monitor_id].gfx_size.height != state->Height) && currprefs.win32_rtgallowscaling) {
if (state->BytesPerPixel > 1 && state->BytesPerPixel * 8 != wc->current_depth && canmatchdepth())
return -1;
if (state->Width < wc->current_width && state->Height < wc->current_height) {
- if ((currprefs.gf[1].gfx_filter_autoscale == 1 || (currprefs.gf[1].gfx_filter_autoscale == 2 && currprefs.win32_rtgallowscaling)) && !canmatchdepth())
+ if ((currprefs.gf[GF_RTG].gfx_filter_autoscale == 1 || (currprefs.gf[GF_RTG].gfx_filter_autoscale == 2 && currprefs.win32_rtgallowscaling)) && !canmatchdepth())
return 0;
}
if (state->Width != wc->current_width ||
} else {
/* fullwindow to fullwindow */
if (mon->screen_is_picasso) {
- if (currprefs.gf[1].gfx_filter_autoscale && ((wc->native_width > state->Width && wc->native_height >= state->Height) || (wc->native_height > state->Height && wc->native_width >= state->Width)))
+ if (currprefs.gf[GF_RTG].gfx_filter_autoscale && ((wc->native_width > state->Width && wc->native_height >= state->Height) || (wc->native_height > state->Height && wc->native_width >= state->Width)))
return -1;
if (currprefs.win32_rtgallowscaling && (state->Width != wc->native_width || state->Height != wc->native_height))
return -1;