windows: Track the window display ID locally

Track the current window display ID locally so as not to depend on specific behavior of the video layer, which may change the value at times when it isn't expected.
This commit is contained in:
Frank Praznik
2023-02-22 12:02:25 -05:00
committed by Sam Lantinga
parent 9f1a7bb94c
commit e8fd7f74bd
3 changed files with 7 additions and 2 deletions

View File

@@ -309,6 +309,7 @@ static int SetupWindowData(_THIS, SDL_Window *window, HWND hwnd, HWND parent, SD
data->last_pointer_update = (LPARAM)-1;
data->videodata = videodata;
data->initializing = SDL_TRUE;
data->last_displayID = window->last_displayID;
data->scaling_dpi = WIN_GetScalingDPIForHWND(videodata, hwnd);
#ifdef HIGHDPI_DEBUG