| Index: ash/display/display_info.cc
|
| diff --git a/ash/display/display_info.cc b/ash/display/display_info.cc
|
| index bffaf3e3516f46353667354c16ef4fca4274b5f8..761f184743d5b2bc0e3a6016aaa22120edd1ce55 100644
|
| --- a/ash/display/display_info.cc
|
| +++ b/ash/display/display_info.cc
|
| @@ -153,6 +153,14 @@ DisplayInfo DisplayInfo::CreateFromSpecWithID(const std::string& spec,
|
| std::string resolution = parts[i];
|
| int width, height;
|
| float refresh_rate = 0.0f;
|
| + float device_scale_factor = 1.0f;
|
| + size_t asterisk_pos = resolution.find("*");
|
| + if (asterisk_pos != std::string::npos) {
|
| + sscanf(resolution.substr(asterisk_pos + 1).c_str(),
|
| + "%f",
|
| + &device_scale_factor);
|
| + resolution = resolution.substr(0, asterisk_pos);
|
| + }
|
| if (sscanf(resolution.c_str(),
|
| "%dx%d%%%f",
|
| &width,
|
| @@ -165,8 +173,9 @@ DisplayInfo DisplayInfo::CreateFromSpecWithID(const std::string& spec,
|
| highest_refresh_rate = refresh_rate;
|
| native_mode = i;
|
| }
|
| - display_modes.push_back(
|
| - DisplayMode(gfx::Size(width, height), refresh_rate, false, false));
|
| + DisplayMode mode(gfx::Size(width, height), refresh_rate, false, false);
|
| + mode.device_scale_factor = device_scale_factor;
|
| + display_modes.push_back(mode);
|
| }
|
| }
|
| display_modes[native_mode].native = true;
|
|
|