View Single Post
Old 14 April 2017, 23:18   #6
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,476
I'm probablyalmost certainly barking up the wrong tree here, but...

extraw and extrah are of type int

win32_scaler.cpp:95
Code:
static void sizeoffset (RECT *dr, RECT *zr, int w, int h)
{
	dr->right -= w;
	dr->bottom -= h;
	OffsetRect (zr, w / 2, h / 2);
}
win32_scaler.cpp:164
Code:
float filter_horiz_zoom_mult = currprefs.gf[picasso_on].gfx_filter_horiz_zoom_mult;
float filter_vert_zoom_mult = currprefs.gf[picasso_on].gfx_filter_vert_zoom_mult;
win32_scaler.cpp:188 near start of getfilterrect2():
Code:
extraw = -aws * (filter_horiz_zoom - currprefs.gf[picasso_on].gfx_filteroverlay_overscan * 10) / 2.0f;
extrah = -ahs * (filter_vert_zoom - currprefs.gf[picasso_on].gfx_filteroverlay_overscan * 10) / 2.0f;
Later on in an if (scalemode == AUTOSCALE_INTEGER || scalemode == AUTOSCALE_INTEGER_AUTOSCALE) {...} statement, you have (line 309):
Code:
	extraw = 0;
	extrah = 0;
After that if statement's closing brace, there is this (line 571):
Code:
cont:
if (!filter_horiz_zoom_mult && !filter_vert_zoom_mult) {
	sizeoffset (dr, zr, extraw, extrah);
	...
So in the case where scalemode is 0 (AUTOSCALE_NONE), extraw and extrah are set by the lines near 188.

Maybe worth adding some logging there???

Also, how are conditions like if (!filter_horiz_zoom_mult && !filter_vert_zoom_mult) evaluated? Because filter_horiz_zoom_mult and filter_vert_zoom_mult are of type float, should you really check whether they are (very) small enough rather than (effectively) compare with zero?
mark_k is offline  
 
Page generated in 0.05091 seconds with 9 queries