src/video/SDL_video.c
changeset 12017 d8a165136edf
parent 12006 1b7ed3438a7f
child 12070 1d65571b57dd
equal deleted inserted replaced
12016:f3d8b8456e7b 12017:d8a165136edf
  1287                 }
  1287                 }
  1288                 display->fullscreen_window = other;
  1288                 display->fullscreen_window = other;
  1289 
  1289 
  1290                 /* Generate a mode change event here */
  1290                 /* Generate a mode change event here */
  1291                 if (resized) {
  1291                 if (resized) {
       
  1292 #ifndef ANDROID
       
  1293                     // Android may not resize the window to exactly what our fullscreen mode is, especially on
       
  1294                     // windowed Android environments like the Chromebook or Samsung DeX.  Given this, we shouldn't
       
  1295                     // use fullscreen_mode.w and fullscreen_mode.h, but rather get our current native size.  As such,
       
  1296                     // Android's SetWindowFullscreen will generate the window event for us with the proper final size.
       
  1297 
  1292                     SDL_SendWindowEvent(other, SDL_WINDOWEVENT_RESIZED,
  1298                     SDL_SendWindowEvent(other, SDL_WINDOWEVENT_RESIZED,
  1293                                         fullscreen_mode.w, fullscreen_mode.h);
  1299                                         fullscreen_mode.w, fullscreen_mode.h);
       
  1300 #endif
  1294                 } else {
  1301                 } else {
  1295                     SDL_OnWindowResized(other);
  1302                     SDL_OnWindowResized(other);
  1296                 }
  1303                 }
  1297 
  1304 
  1298                 SDL_RestoreMousePosition(other);
  1305                 SDL_RestoreMousePosition(other);