src/video/windows/SDL_windowswindow.c
changeset 5580 0c407e6d14a9
parent 5535 96594ac5fd1a
child 5581 f40f9d3ca2bc
equal deleted inserted replaced
5579:c8862e1bc41f 5580:0c407e6d14a9
   634 	WINCE_ShowWindow(_this, window, 0);
   634 	WINCE_ShowWindow(_this, window, 0);
   635 #endif
   635 #endif
   636         ReleaseDC(data->hwnd, data->hdc);
   636         ReleaseDC(data->hwnd, data->hdc);
   637         if (data->created) {
   637         if (data->created) {
   638             DestroyWindow(data->hwnd);
   638             DestroyWindow(data->hwnd);
       
   639         } else {
       
   640             /* Restore any original event handler... */
       
   641             if (data->wndproc != NULL) {
       
   642 #ifdef GWLP_WNDPROC
       
   643                 SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) data->wndproc);
       
   644 #else
       
   645                 SetWindowLong(hwnd, GWL_WNDPROC, (LONG_PTR) data->wndproc);
       
   646 #endif
       
   647             }
   639         }
   648         }
   640         SDL_free(data);
   649         SDL_free(data);
   641     }
   650     }
   642 }
   651 }
   643 
   652