I am doing next:
1. Calc new scale factor (float(HIWORD(wParam)) / USER_DEFAULT_SCREEN_DPI);
2. Call Browser->Host->NotifyScreenInfoChanged()
3. And my GetScreenInfo function is:
- Code: Select all
bool
CefClientHandler::GetScreenInfo(
CefRefPtr<CefBrowser> browser, CefScreenInfo& screen_info)
{
screen_info.device_scale_factor = myScaleFactor;
return true;
}
It seems to work, but I am not sure if this a right way to go ? Any suggestions/advises ?