예제 #1
0
int lib_graphics_f_FindDisplayInfo_2(emumsg_syscall_t *msg)
{
	/* Make real syscall */
	msg->arg[0]._aptr = FindDisplayInfo(msg->arg[0]._ulong);

	return HOOK_DONE;
}
예제 #2
0
파일: XDPSshare.c 프로젝트: narenas/nx-libs
static DisplayInfo LookupDisplayInfo(Display *display)
{
    DisplayInfo d = FindDisplayInfo(display);

    if (d == NULL) d = AllocDisplayInfo(display, (DPSContext) NULL);

    return d;
}
예제 #3
0
파일: font.c 프로젝트: seanregan/browser
void ami_font_setdevicedpi(int id)
{
	DisplayInfoHandle dih;
	struct DisplayInfo dinfo;
	ULONG ydpi = option_amiga_ydpi;
	ULONG xdpi = option_amiga_ydpi;

	nscss_screen_dpi = INTTOFIX(option_amiga_ydpi);

	if(id && (option_monitor_aspect_x != 0) && (option_monitor_aspect_y != 0))
	{
		if(dih = FindDisplayInfo(id))
		{
			if(GetDisplayInfoData(dih, &dinfo, sizeof(struct DisplayInfo),
				DTAG_DISP, 0))
			{
				int xres = dinfo.Resolution.x;
				int yres = dinfo.Resolution.y;

				if((option_monitor_aspect_x != 4) || (option_monitor_aspect_y != 3))
				{
					/* AmigaOS sees 4:3 modes as square in the DisplayInfo database,
					 * so we correct other modes to "4:3 equiv" here. */
					xres = (xres * option_monitor_aspect_x) / 4;
					yres = (yres * option_monitor_aspect_y) / 3;
				}

				xdpi = (yres * ydpi) / xres;

				LOG(("XDPI = %ld, YDPI = %ld (DisplayInfo resolution %ld x %ld, corrected %ld x %ld)",
					xdpi, ydpi, dinfo.Resolution.x, dinfo.Resolution.y, xres, yres));
			}
		}
	}

	ami_xdpi = xdpi;
	ami_devicedpi = (xdpi << 16) | ydpi;
}