Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Make the union nameless to reduce the complexity of the API.
Browse files Browse the repository at this point in the history
(Are there any compilers still in use that don't support this?)
  • Loading branch information
slouken committed Sep 30, 2010
1 parent e9bbe6a commit 1073dce
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions include/SDL_syswm.h
Expand Up @@ -133,7 +133,7 @@ struct SDL_SysWMmsg
/* No Cocoa window events yet */
} cocoa;
#endif
} msg;
} /*msg*/;
};

/**
Expand Down Expand Up @@ -175,7 +175,7 @@ struct SDL_SysWMinfo
NSWindow *window;
} cocoa;
#endif
} info;
} /*info*/;
};

#endif /* SDL_PROTOTYPES_ONLY */
Expand Down
2 changes: 1 addition & 1 deletion src/video/cocoa/SDL_cocoawindow.m
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions src/video/win32/SDL_win32events.c
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion src/video/win32/SDL_win32window.c
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/video/x11/SDL_x11events.c
Expand Up @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions src/video/x11/SDL_x11window.c
Expand Up @@ -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",
Expand Down

0 comments on commit 1073dce

Please sign in to comment.