changeset 4902:50d0bff24d81

Make the union nameless to reduce the complexity of the API. (Are there any compilers still in use that don't support this?)
author Sam Lantinga <slouken@libsdl.org>
date Wed, 29 Sep 2010 21:13:52 -0700
parents deadc1219bea
children f50c7996d925
files include/SDL_syswm.h src/video/cocoa/SDL_cocoawindow.m src/video/win32/SDL_win32events.c src/video/win32/SDL_win32window.c src/video/x11/SDL_x11events.c src/video/x11/SDL_x11window.c
diffstat 6 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/include/SDL_syswm.h	Mon Sep 27 01:30:42 2010 -0700
+++ b/include/SDL_syswm.h	Wed Sep 29 21:13:52 2010 -0700
@@ -133,7 +133,7 @@
             /* No Cocoa window events yet */
         } cocoa;
 #endif
-    } msg;
+    } /*msg*/;
 };
 
 /**
@@ -175,7 +175,7 @@
             NSWindow *window;
         } cocoa;
 #endif
-    } info;
+    } /*info*/;
 };
 
 #endif /* SDL_PROTOTYPES_ONLY */
--- a/src/video/cocoa/SDL_cocoawindow.m	Mon Sep 27 01:30:42 2010 -0700
+++ b/src/video/cocoa/SDL_cocoawindow.m	Wed Sep 29 21:13:52 2010 -0700
@@ -708,7 +708,7 @@
 
     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",
--- a/src/video/win32/SDL_win32events.c	Mon Sep 27 01:30:42 2010 -0700
+++ b/src/video/win32/SDL_win32events.c	Wed Sep 29 21:13:52 2010 -0700
@@ -114,10 +114,10 @@
 
         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);
     }
 
--- a/src/video/win32/SDL_win32window.c	Mon Sep 27 01:30:42 2010 -0700
+++ b/src/video/win32/SDL_win32window.c	Wed Sep 29 21:13:52 2010 -0700
@@ -552,7 +552,7 @@
     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",
--- a/src/video/x11/SDL_x11events.c	Mon Sep 27 01:30:42 2010 -0700
+++ b/src/video/x11/SDL_x11events.c	Wed Sep 29 21:13:52 2010 -0700
@@ -90,7 +90,7 @@
 
         SDL_VERSION(&wmmsg.version);
         wmmsg.subsystem = SDL_SYSWM_X11;
-        wmmsg.msg.x11.event = xevent;
+        wmmsg.x11.event = xevent;
         SDL_SendSysWMEvent(&wmmsg);
     }
 
--- a/src/video/x11/SDL_x11window.c	Mon Sep 27 01:30:42 2010 -0700
+++ b/src/video/x11/SDL_x11window.c	Wed Sep 29 21:13:52 2010 -0700
@@ -1125,8 +1125,8 @@
     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",