Dan Kegel : dinput: Fix compilation on systems that don' t support nameless unions.
Alexandre Julliard
julliard at winehq.org
Fri Sep 9 10:56:48 CDT 2011
Module: wine
Branch: master
Commit: b7bb3538f9e694f4d7c9cef0a0738d68650b2673
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b7bb3538f9e694f4d7c9cef0a0738d68650b2673
Author: Dan Kegel <dank at kegel.com>
Date: Fri Sep 9 07:01:10 2011 -0700
dinput: Fix compilation on systems that don't support nameless unions.
---
dlls/dinput/config.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/dinput/config.c b/dlls/dinput/config.c
index 1c6da6c..9e080f1 100644
--- a/dlls/dinput/config.c
+++ b/dlls/dinput/config.c
@@ -16,6 +16,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#define NONAMELESSUNION
+
#include "wine/debug.h"
#include "wine/unicode.h"
#include "objbase.h"
@@ -141,7 +143,7 @@ static void lv_set_action(HWND dialog, int item, int action, LPDIACTIONFORMATW l
if (item < 0) return;
if (action != -1)
- action_text = lpdiaf->rgoAction[action].lptszActionName;
+ action_text = lpdiaf->rgoAction[action].u.lptszActionName;
/* Keep the action and text in the listview item */
lvItem.iItem = item;
@@ -282,7 +284,7 @@ static void show_suitable_actions(HWND dialog)
/* Add action string and index in the action format to the list entry */
if (DIDFT_GETINSTANCE(lpdiaf->rgoAction[i].dwSemantic) & DIDFT_GETTYPE(device->ddo[obj].dwType))
{
- SendDlgItemMessageW(dialog, IDC_ACTIONLIST, LB_ADDSTRING, 0, (LPARAM)lpdiaf->rgoAction[i].lptszActionName);
+ SendDlgItemMessageW(dialog, IDC_ACTIONLIST, LB_ADDSTRING, 0, (LPARAM)lpdiaf->rgoAction[i].u.lptszActionName);
SendDlgItemMessageW(dialog, IDC_ACTIONLIST, LB_SETITEMDATA, added, (LPARAM) i);
added++;
}
@@ -337,7 +339,7 @@ static void copy_actions(LPDIACTIONFORMATW to, LPDIACTIONFORMATW from)
to->rgoAction[i].guidInstance = from->rgoAction[i].guidInstance;
to->rgoAction[i].dwObjID = from->rgoAction[i].dwObjID;
to->rgoAction[i].dwHow = from->rgoAction[i].dwHow;
- to->rgoAction[i].lptszActionName = from->rgoAction[i].lptszActionName;
+ to->rgoAction[i].u.lptszActionName = from->rgoAction[i].u.lptszActionName;
}
}
More information about the wine-cvs
mailing list