From 9a766e16a72f0be77b7a60770a7262cd25bbed76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 20 Jul 2007 00:31:48 +0000 Subject: [PATCH] * Fixed Haiku build over here (no such thing as BEOS_NAME_LENGTH defined here) * Did anyone see the coding style violations in this file??? :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21673 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/preferences/joysticks/JoyWin.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/preferences/joysticks/JoyWin.cpp b/src/preferences/joysticks/JoyWin.cpp index 5c96f9b919..31822fd78b 100644 --- a/src/preferences/joysticks/JoyWin.cpp +++ b/src/preferences/joysticks/JoyWin.cpp @@ -130,21 +130,22 @@ bool JoyWin::QuitRequested() /* Initialization */ -status_t JoyWin::AddDevices() +status_t +JoyWin::AddDevices() { - char buf[BEOS_NAME_LENGTH]; + char name[B_FILE_NAME_LENGTH]; int devId = 0; MessagedItem* device; - BMessage* message; - BString str; + BMessage* message; + BString str; - while (!fJoystick.GetDeviceName(devId, buf, BEOS_NAME_LENGTH)) { + while (!fJoystick.GetDeviceName(devId, name, sizeof(name))) { message = new BMessage(PORT_SELECTED); - message->AddString("devname", buf); + message->AddString("devname", name); // NOTE: Adding the index in the list might be useful. // TODO: Change it with leaf path - str.SetTo(buf); + str.SetTo(name); //str = str.Remove(0, str.FindLast('/') ); device = new MessagedItem(str.String(), message);