Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Make the union nameless to reduce the complexity of the API.
(Are there any compilers still in use that don't support this?)
- Loading branch information
|
@@ -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 */ |
|
|
|
@@ -708,7 +708,7 @@ - (BOOL)canBecomeMainWindow |
|
|
|
|
|
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", |
|
|
|
@@ -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); |
|
|
} |
|
|
|
|
|
|
@@ -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", |
|
|
|
@@ -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); |
|
|
} |
|
|
|
|
|
|
@@ -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", |
|
|