: Software Foundation.
Authors : os, m
Created : 2007-08-27 13:55:49
- Updated : 2022-12-06 12:23:10
+ Updated : 2023-04-04 14:45:34
Comment : RetroPlatform Player interprocess communication include file
*****************************************************************************/
#define RP_SCREENMODE_SCALING_SUBPIXEL 0x00100000 // use sub-pixel (non-integer) scaling in RP_SCREENMODE_SCALE_TARGET or RP_SCREENMODE_SCALE_MAX modes; if not set, up to four black bars may be added; if set, up to two black bars may be added
#define RP_SCREENMODE_SCALING_STRETCH 0x00200000 // "stretch to fill" (do not preserve original ratio) in RP_SCREENMODE_SCALE_TARGET or RP_SCREENMODE_SCALE_MAX modes; if set, no black bars are added
#define RP_SCREENMODE_PIXEL_ORIGINAL_RATIO 0x00400000 // use pixel original ratio (when not set, square pixel ratio or a multiple thereof is used, which grants optimal sharpness and avoids screen distortions)
+#define RP_SCREENMODE_INTERPOLATION 0x00800000 // scale image using bilinear interpolation
// Clip Flags (used only from host to guest, never from guest to host)
#define RP_CLIPFLAGS_AUTOCLIP 0x00000001 // ignore all 4 Clip values (same as all values = -1) and use "smart" offset and size
m &= ~RP_SCREENMODE_DISPLAYMASK;
m |= p->gfx_apmode[rtg ? APMODE_RTG : APMODE_NATIVE].gfx_display << 8;
}
- if (full > 1)
+ if (full > 1) {
m |= RP_SCREENMODE_FULLSCREEN_SHARED;
+ }
+ if (p->gf[rtg].gfx_filter_bilinear) {
+ m |= RP_SCREENMODE_INTERPOLATION;
+ }
sm->dwScreenMode = m | (storeflags & (RP_SCREENMODE_SCALING_STRETCH | RP_SCREENMODE_SCALING_SUBPIXEL));
sm->lTargetHeight = 0;
sm->dwClipFlags = cf;
if (log_rp & 2) {
- write_log (_T("%sGET_RPSM: hres=%d (%d) vres=%d (%d) full=%d xcpos=%d ycpos=%d w=%d h=%d vm=%d hm=%d half=%d\n"),
+ write_log (_T("%sGET_RPSM: hres=%d (%d) vres=%d (%d) full=%d xcpos=%d ycpos=%d w=%d h=%d vm=%.2f hm=%.2f half=%d\n"),
rtg ? _T("RTG ") : _T(""),
totalhdbl, hres, totalvdbl, vres, full,
p->gfx_xcenter_pos, p->gfx_ycenter_pos,
vres = max_vert_dbl;
}
- if (smm_m > RP_SCREENMODE_SCALE_4X) {
+ if (smm_m > RP_SCREENMODE_SCALE_4X && smm < RP_SCREENMODE_SCALE_TARGET) {
xtramult = (smm_m + 1.0f) / 4.0f;
hmult *= xtramult;
vmult *= xtramult;
p->win32_rtgallowscaling = false;
p->win32_rtgscaleaspectratio = keepaspect ? -1 : 0;
+ p->gf[GF_RTG].gfx_filter_bilinear = (sm->dwScreenMode & RP_SCREENMODE_INTERPOLATION) != 0;
if (integerscale) {
p->gf[GF_RTG].gfx_filter_autoscale = RTG_MODE_INTEGER_SCALE;
p->gf[0].gfx_filter_left_border = -1;
p->gf[0].gfx_filter_top_border = -1;
}
+ p->gf[0].gfx_filter_bilinear = (sm->dwScreenMode & RP_SCREENMODE_INTERPOLATION) != 0;
}
if (log_rp & 2) {
feat = RP_FEATURE_POWERLED | RP_FEATURE_SCREEN1X | RP_FEATURE_FULLSCREEN;
feat |= RP_FEATURE_PAUSE | RP_FEATURE_TURBO_CPU | RP_FEATURE_TURBO_FLOPPY | RP_FEATURE_VOLUME | RP_FEATURE_SCREENCAPTURE;
feat |= RP_FEATURE_DEVICEREADWRITE;
- if (currprefs.gfx_api) {
- feat |= RP_FEATURE_SCREENOVERLAY;
- }
+ feat |= RP_FEATURE_SCREENOVERLAY;
if (WIN32GFX_IsPicassoScreen(mon)) {
feat |= RP_FEATURE_SCREEN2X | RP_FEATURE_SCREEN3X | RP_FEATURE_SCREEN4X;
} else {