src/video/emscripten/SDL_emscriptenevents.c
changeset 10541 727f7d796b8d
parent 10338 638ec32cfcce
child 10629 813f1b3c63aa
     1.1 --- a/src/video/emscripten/SDL_emscriptenevents.c	Fri Oct 14 08:56:04 2016 -0700
     1.2 +++ b/src/video/emscripten/SDL_emscriptenevents.c	Fri Oct 14 17:06:28 2016 +0100
     1.3 @@ -545,6 +545,10 @@
     1.4  Emscripten_HandleResize(int eventType, const EmscriptenUiEvent *uiEvent, void *userData)
     1.5  {
     1.6      SDL_WindowData *window_data = userData;
     1.7 +
     1.8 +    /* update pixel ratio */
     1.9 +    window_data->pixel_ratio = emscripten_get_device_pixel_ratio();
    1.10 +
    1.11      if(!(window_data->window->flags & FULLSCREEN_MASK))
    1.12      {
    1.13          /* this will only work if the canvas size is set through css */