int gfx_filter_autoscale;
int gfx_filter_integerscalelimit;
int gfx_filter_keep_autoscale_aspect;
+ bool changed;
};
#define MAX_DUPLICATE_EXPANSION_BOARDS 5
#define IDC_RTG_THREAD 1800
#define IDC_PORT3_REMAP 1801
#define IDC_INPUTMAPOUT 1801
+#define IDC_RTG_INTEGERSCALE 1801
#define IDC_INFOBOX_TEXT2 1802
#define IDC_INPUTMAPOUTM 1802
#define IDC_INFOBOX_TEXT1 1803
CONTROL "Scale if smaller than display size setting",IDC_RTG_SCALE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,130,175,10
CONTROL "Always scale in windowed mode",IDC_RTG_SCALE_ALLOW,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,143,170,10
- CONTROL "Always center",IDC_RTG_CENTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,156,169,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,143,162,10
+ CONTROL "Always center",IDC_RTG_CENTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,156,162,10
CONTROL "Hardware vertical blank interrupt",IDC_RTG_VBINTERRUPT,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,169,157,10
- CONTROL "Multithreaded",IDC_RTG_THREAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,207,156,83,10
- CONTROL "Hardware sprite emulation",IDC_RTG_HWSPRITE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,207,169,148,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,195,169,129,10
+ CONTROL "Multithreaded",IDC_RTG_THREAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,195,143,83,10
+ CONTROL "Hardware sprite emulation",IDC_RTG_HWSPRITE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,195,156,96,10
CTEXT "Color modes:",IDC_STATIC,295,81,83,10,SS_CENTERIMAGE
COMBOBOX IDC_RTG_8BIT,296,96,82,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_RTG_16BIT,296,113,82,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_RTG_BUFFERCNT,153,227,84,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
CTEXT "Aspect ratio:",IDC_STATIC,282,212,83,10,SS_CENTERIMAGE
COMBOBOX IDC_RTG_SCALE_ASPECTRATIO,282,227,84,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Integer scaling",IDC_RTG_INTEGERSCALE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,169,161,10
END
IDD_INPUTMAP DIALOGEX 0, 0, 421, 341
return;
if (currprefs.gf[1].gfx_filter_horiz_zoom_mult > 0) {
- picasso_offset_mx *= currprefs.gf[1].gfx_filter_horiz_zoom_mult * currprefs.gf[1].gfx_filter_horiz_zoom / 1000.0f;
+ picasso_offset_mx *= currprefs.gf[1].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 * currprefs.gf[1].gfx_filter_vert_zoom / 1000.0f;
+ picasso_offset_my *= currprefs.gf[1].gfx_filter_vert_zoom_mult;
}
if (!mon->scalepicasso)
int divx = mon->currentmode.native_width / srcwidth;
int divy = mon->currentmode.native_height / srcheight;
int mul = divx > divy ? divy : divx;
- int xx = srcwidth * mul;
- int yy = srcheight * mul;
SetRect (dr, 0, 0, mon->currentmode.native_width / mul, mon->currentmode.native_height / mul);
- //picasso_offset_x = -(state->Width - xx) / 2;
- //picasso_offset_y = -(mon->currentmode.native_height - srcheight) / 2;
+ int xx = (mon->currentmode.native_width / mul - srcwidth) / 2;
+ int yy = (mon->currentmode.native_height / mul - srcheight) / 2;
+ picasso_offset_x = -xx;
+ picasso_offset_y = -yy;
mx = my = 1.0;
} else if (mon->scalepicasso == RTG_MODE_CENTER) {
int xx = (mon->currentmode.native_width - srcwidth) / 2;
int yy = (mon->currentmode.native_height - srcheight) / 2;
picasso_offset_x = -xx;
picasso_offset_y = -yy;
+ SetRect (sr, 0, 0, mon->currentmode.native_width, mon->currentmode.native_height);
SetRect (dr, 0, 0, mon->currentmode.native_width, mon->currentmode.native_height);
mx = my = 1.0;
} else {
if (currprefs.gf[1].gfx_filter_vert_zoom_mult > 0) {
my *= currprefs.gf[1].gfx_filter_vert_zoom_mult;
}
- mx = mx + mx * currprefs.gf[1].gfx_filter_horiz_zoom / 1000.0f;
- my = my + my * currprefs.gf[1].gfx_filter_vert_zoom / 1000.0f;
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);
currprefs.gfx_apmode[1].gfx_interlaced = false;
mon->currentmode.current_height = currprefs.gfx_monitor[mon->monitor_id].gfx_size.height;
}
} else {
- mon->scalepicasso = 2;
+ mon->scalepicasso = RTG_MODE_CENTER;
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;
}
ew(hDlg, IDC_RTG_MATCH_DEPTH, rtg3);
ew(hDlg, IDC_RTG_SCALE, rtg2);
ew(hDlg, IDC_RTG_CENTER, rtg2);
+ ew(hDlg, IDC_RTG_INTEGERSCALE, rtg2);
ew(hDlg, IDC_RTG_SCALE_ALLOW, rtg2);
ew(hDlg, IDC_RTG_SCALE_ASPECTRATIO, rtg2);
ew(hDlg, IDC_RTG_VBLANKRATE, rtg2);
xSendDlgItemMessage(hDlg, IDC_RTG_VBLANKRATE, WM_SETTEXT, 0, (LPARAM) tmp);
}
-
CheckDlgButton(hDlg, IDC_RTG_SCALE, workprefs.gf[1].gfx_filter_autoscale == RTG_MODE_SCALE);
CheckDlgButton(hDlg, IDC_RTG_CENTER, workprefs.gf[1].gfx_filter_autoscale == RTG_MODE_CENTER);
+ CheckDlgButton(hDlg, IDC_RTG_INTEGERSCALE, workprefs.gf[1].gfx_filter_autoscale == RTG_MODE_INTEGER_SCALE);
CheckDlgButton(hDlg, IDC_RTG_SCALE_ALLOW, workprefs.win32_rtgallowscaling);
CheckDlgButton(hDlg, IDC_RTG_MATCH_DEPTH, workprefs.win32_rtgmatchdepth);
CheckDlgButton(hDlg, IDC_RTG_VBINTERRUPT, workprefs.rtg_hardwareinterrupt);
switch (LOWORD (wParam))
{
case IDC_RTG_MATCH_DEPTH:
- workprefs.win32_rtgmatchdepth = ischecked (hDlg, IDC_RTG_MATCH_DEPTH);
+ workprefs.win32_rtgmatchdepth = ischecked(hDlg, IDC_RTG_MATCH_DEPTH);
break;
case IDC_RTG_SCALE:
workprefs.gf[1].gfx_filter_autoscale = ischecked(hDlg, IDC_RTG_SCALE) ? RTG_MODE_SCALE : 0;
- setchecked (hDlg, IDC_RTG_CENTER, false);
+ setchecked(hDlg, IDC_RTG_CENTER, false);
+ setchecked(hDlg, IDC_RTG_INTEGERSCALE, false);
break;
case IDC_RTG_CENTER:
workprefs.gf[1].gfx_filter_autoscale = ischecked(hDlg, IDC_RTG_CENTER) ? RTG_MODE_CENTER : 0;
- setchecked (hDlg, IDC_RTG_SCALE, false);
+ setchecked(hDlg, IDC_RTG_SCALE, false);
+ setchecked(hDlg, IDC_RTG_INTEGERSCALE, false);
+ break;
+ case IDC_RTG_INTEGERSCALE:
+ workprefs.gf[1].gfx_filter_autoscale = ischecked(hDlg, IDC_RTG_INTEGERSCALE) ? RTG_MODE_INTEGER_SCALE : 0;
+ setchecked(hDlg, IDC_RTG_SCALE, false);
+ setchecked(hDlg, IDC_RTG_CENTER, false);
break;
case IDC_RTG_SCALE_ALLOW:
- workprefs.win32_rtgallowscaling = ischecked (hDlg, IDC_RTG_SCALE_ALLOW);
+ workprefs.win32_rtgallowscaling = ischecked(hDlg, IDC_RTG_SCALE_ALLOW);
break;
case IDC_RTG_VBINTERRUPT:
- workprefs.rtg_hardwareinterrupt = ischecked (hDlg, IDC_RTG_VBINTERRUPT);
+ workprefs.rtg_hardwareinterrupt = ischecked(hDlg, IDC_RTG_VBINTERRUPT);
break;
case IDC_RTG_HWSPRITE:
workprefs.rtg_hardwaresprite = ischecked(hDlg, IDC_RTG_HWSPRITE);
xSendDlgItemMessage(hDlg, IDC_FILTERAUTOSCALE, CB_ADDSTRING, 0, (LPARAM)txt);
WIN32GUI_LoadUIString(IDS_AUTOSCALE_CENTER, txt, sizeof (txt) / sizeof (TCHAR));
xSendDlgItemMessage(hDlg, IDC_FILTERAUTOSCALE, CB_ADDSTRING, 0, (LPARAM)txt);
-#if 0
WIN32GUI_LoadUIString(IDS_AUTOSCALE_INTEGER, txt, sizeof (txt) / sizeof (TCHAR));
xSendDlgItemMessage(hDlg, IDC_FILTERAUTOSCALE, CB_ADDSTRING, 0, (LPARAM)txt);
-#endif
}
xSendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_SETCURSEL, workprefs.gf[filter_nativertg].gfx_filter_autoscale, 0);
xSendDlgItemMessage (hDlg, IDC_FILTERINTEGER, CB_SETCURSEL, workprefs.gf[filter_nativertg].gfx_filter_integerscalelimit, 0);