mirror of https://github.com/encounter/SDL.git
parent
528e48b980
commit
331a434fa1
|
@ -186,6 +186,7 @@ struct SDL_SysWMinfo
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
HWND window; /**< The window handle */
|
HWND window; /**< The window handle */
|
||||||
|
HDC hdc; /**< The window device context */
|
||||||
} win;
|
} win;
|
||||||
#endif
|
#endif
|
||||||
#if defined(SDL_VIDEO_DRIVER_WINRT)
|
#if defined(SDL_VIDEO_DRIVER_WINRT)
|
||||||
|
|
|
@ -643,10 +643,11 @@ WIN_DestroyWindow(_THIS, SDL_Window * window)
|
||||||
SDL_bool
|
SDL_bool
|
||||||
WIN_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
|
WIN_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
|
||||||
{
|
{
|
||||||
HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
|
const SDL_WindowData *data = (const SDL_WindowData *) window->driverdata;
|
||||||
if (info->version.major <= SDL_MAJOR_VERSION) {
|
if (info->version.major <= SDL_MAJOR_VERSION) {
|
||||||
info->subsystem = SDL_SYSWM_WINDOWS;
|
info->subsystem = SDL_SYSWM_WINDOWS;
|
||||||
info->info.win.window = hwnd;
|
info->info.win.window = data->hwnd;
|
||||||
|
info->info.win.hdc = data->hdc;
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
} else {
|
} else {
|
||||||
SDL_SetError("Application not compiled with SDL %d.%d\n",
|
SDL_SetError("Application not compiled with SDL %d.%d\n",
|
||||||
|
|
Loading…
Reference in New Issue