Make the union nameless to reduce the complexity of the API.

(Are there any compilers still in use that don't support this?)
This commit is contained in:
Sam Lantinga 2010-09-29 21:13:52 -07:00
parent 51b19abe02
commit 3189c43f85
6 changed files with 11 additions and 11 deletions

View file

@ -133,7 +133,7 @@ struct SDL_SysWMmsg
/* No Cocoa window events yet */
} cocoa;
#endif
} msg;
} /*msg*/;
};
/**
@ -175,7 +175,7 @@ struct SDL_SysWMinfo
NSWindow *window;
} cocoa;
#endif
} info;
} /*info*/;
};
#endif /* SDL_PROTOTYPES_ONLY */

View file

@ -708,7 +708,7 @@ Cocoa_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
if (info->version.major <= SDL_MAJOR_VERSION) {
info->subsystem = SDL_SYSWM_COCOA;
info->info.cocoa.window = nswindow;
info->cocoa.window = nswindow;
return SDL_TRUE;
} else {
SDL_SetError("Application not compiled with SDL %d.%d\n",

View file

@ -114,10 +114,10 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
SDL_VERSION(&wmmsg.version);
wmmsg.subsystem = SDL_SYSWM_WINDOWS;
wmmsg.msg.win.hwnd = hwnd;
wmmsg.msg.win.msg = msg;
wmmsg.msg.win.wParam = wParam;
wmmsg.msg.win.lParam = lParam;
wmmsg.win.hwnd = hwnd;
wmmsg.win.msg = msg;
wmmsg.win.wParam = wParam;
wmmsg.win.lParam = lParam;
SDL_SendSysWMEvent(&wmmsg);
}

View file

@ -552,7 +552,7 @@ WIN_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
if (info->version.major <= SDL_MAJOR_VERSION) {
info->subsystem = SDL_SYSWM_WINDOWS;
info->info.win.window = hwnd;
info->win.window = hwnd;
return SDL_TRUE;
} else {
SDL_SetError("Application not compiled with SDL %d.%d\n",

View file

@ -90,7 +90,7 @@ X11_DispatchEvent(_THIS)
SDL_VERSION(&wmmsg.version);
wmmsg.subsystem = SDL_SYSWM_X11;
wmmsg.msg.x11.event = xevent;
wmmsg.x11.event = xevent;
SDL_SendSysWMEvent(&wmmsg);
}

View file

@ -1125,8 +1125,8 @@ X11_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
if (info->version.major == SDL_MAJOR_VERSION &&
info->version.minor == SDL_MINOR_VERSION) {
info->subsystem = SDL_SYSWM_X11;
info->info.x11.display = display;
info->info.x11.window = data->xwindow;
info->x11.display = display;
info->x11.window = data->xwindow;
return SDL_TRUE;
} else {
SDL_SetError("Application not compiled with SDL %d.%d\n",