src/video/emscripten/SDL_emscriptenvideo.c
changeset 10895 fd63ed9b0746
parent 10737 3406a0f8b041
child 11191 c3b94a174d81
     1.1 --- a/src/video/emscripten/SDL_emscriptenvideo.c	Fri Feb 17 02:25:37 2017 -0500
     1.2 +++ b/src/video/emscripten/SDL_emscriptenvideo.c	Fri Feb 17 10:13:07 2017 +0000
     1.3 @@ -263,7 +263,9 @@
     1.4      if (window->driverdata) {
     1.5          data = (SDL_WindowData *) window->driverdata;
     1.6          /* update pixel ratio */
     1.7 -        data->pixel_ratio = emscripten_get_device_pixel_ratio();
     1.8 +        if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) {
     1.9 +            data->pixel_ratio = emscripten_get_device_pixel_ratio();
    1.10 +        }
    1.11          emscripten_set_canvas_size(window->w * data->pixel_ratio, window->h * data->pixel_ratio);
    1.12  
    1.13          /*scale canvas down*/