src/video/windows/SDL_windowswindow.c
changeset 10631 29871de88287
parent 10450 d5864048ba51
child 10634 fbd8834ba7b8
equal deleted inserted replaced
10630:e84b1dbe4113 10631:29871de88287
   695 SDL_bool
   695 SDL_bool
   696 WIN_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
   696 WIN_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
   697 {
   697 {
   698     const SDL_WindowData *data = (const SDL_WindowData *) window->driverdata;
   698     const SDL_WindowData *data = (const SDL_WindowData *) window->driverdata;
   699     if (info->version.major <= SDL_MAJOR_VERSION) {
   699     if (info->version.major <= SDL_MAJOR_VERSION) {
       
   700         int versionnum = SDL_VERSIONNUM(info->version.major, info->version.minor, info->version.patch);
       
   701 
   700         info->subsystem = SDL_SYSWM_WINDOWS;
   702         info->subsystem = SDL_SYSWM_WINDOWS;
   701         info->info.win.window = data->hwnd;
   703         info->info.win.window = data->hwnd;
   702         info->info.win.hdc = data->hdc;
   704 
       
   705         if (versionnum >= SDL_VERSIONNUM(2, 0, 4)) {
       
   706             info->info.win.hdc = data->hdc;
       
   707         }
       
   708 
   703         return SDL_TRUE;
   709         return SDL_TRUE;
   704     } else {
   710     } else {
   705         SDL_SetError("Application not compiled with SDL %d.%d\n",
   711         SDL_SetError("Application not compiled with SDL %d.%d\n",
   706                      SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
   712                      SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
   707         return SDL_FALSE;
   713         return SDL_FALSE;