Ejemplo n.º 1
0
	Core::eDeviceFamily Core::GetDeviceFamily()
	{
		float32 width = GetPhysicalScreenWidth();
		float32 height = GetPhysicalScreenHeight();
		float32 dpi = GetScreenDPI();

		float32 inches = sqrt((width * width) + (height * height)) / dpi;

		if (inches > 6.f)
			return DEVICE_PAD;

		return DEVICE_HANDSET;
	}
Ejemplo n.º 2
0
HWND g_HotExprLFW = NULL; // Last Found Window of last #if expression.
HotkeyCriterion *g_FirstHotExpr = NULL, *g_LastHotExpr = NULL;

static int GetScreenDPI()
{
	// The DPI setting can be different for each screen axis, but
	// apparently it is such a rare situation that it is not worth
	// supporting it. So we just retrieve the X axis DPI.

	HDC hdc = GetDC(NULL);
	int dpi = GetDeviceCaps(hdc, LOGPIXELSX);
	ReleaseDC(NULL, hdc);
	return dpi;
}

int g_ScreenDPI = GetScreenDPI();
MenuTypeType g_MenuIsVisible = MENU_TYPE_NONE;
int g_nMessageBoxes = 0;
int g_nInputBoxes = 0;
int g_nFileDialogs = 0;
int g_nFolderDialogs = 0;
InputBoxType g_InputBox[MAX_INPUTBOXES];
SplashType g_Progress[MAX_PROGRESS_WINDOWS] = {{0}};
SplashType g_SplashImage[MAX_SPLASHIMAGE_WINDOWS] = {{0}};
GuiType **g_gui = NULL;
int g_guiCount = 0, g_guiCountMax = 0;
HWND g_hWndToolTip[MAX_TOOLTIPS] = {NULL};
MsgMonitorList g_MsgMonitor;

// Init not needed for these:
UCHAR g_SortCaseSensitive;