Officially added the concept of window pixel density

The SDL_WINDOW_ALLOW_HIGHDPI flag has been renamed SDL_WINDOW_HIGH_PIXEL_DENSITY, and added the function SDL_GetWindowPixelDensity()
This commit is contained in:
Sam Lantinga
2023-05-17 16:39:15 -07:00
parent e708674416
commit cc94f600fd
19 changed files with 59 additions and 70 deletions

View File

@@ -861,7 +861,7 @@ static EM_BOOL Emscripten_HandleResize(int eventType, const EmscriptenUiEvent *u
SDL_bool force = SDL_FALSE;
/* update pixel ratio */
if (window_data->window->flags & SDL_WINDOW_ALLOW_HIGHDPI) {
if (window_data->window->flags & SDL_WINDOW_HIGH_PIXEL_DENSITY) {
if (window_data->pixel_ratio != emscripten_get_device_pixel_ratio()) {
window_data->pixel_ratio = emscripten_get_device_pixel_ratio();
force = SDL_TRUE;