X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fprofile.cpp;h=5f1ca13035be6d23b1e2202ff99b83ff10f1bb7a;hb=240a6df48aebb5e17f82452c32e770cdfe9b5d5e;hp=6e43ad0da677502d6bb6160b3bf7a1d0154d4556;hpb=56f80e7876367f9da3cff765b46e842270d45a0d;p=virtualjaguar diff --git a/src/gui/profile.cpp b/src/gui/profile.cpp index 6e43ad0..5f1ca13 100644 --- a/src/gui/profile.cpp +++ b/src/gui/profile.cpp @@ -30,6 +30,7 @@ // #include "profile.h" +#include #include "gamepad.h" #include "log.h" #include "settings.h" @@ -96,7 +97,7 @@ void ReadProfiles(QSettings * set) for(int i=1; isetArrayIndex(i - 1); - strcpy(deviceNames[i], set->value("deviceName").toString().toAscii().data()); + strcpy(deviceNames[i], set->value("deviceName").toString().toUtf8().data()); #ifdef DEBUG_PROFILES printf("Read device name: %s\n", deviceNames[i]); #endif @@ -112,7 +113,7 @@ printf("Number of profiles: %u\n", numberOfProfiles); { set->setArrayIndex(i); profile[i].device = set->value("deviceNum").toInt(); - strcpy(profile[i].mapName, set->value("mapName").toString().toAscii().data()); + strcpy(profile[i].mapName, set->value("mapName").toString().toUtf8().data()); profile[i].preferredSlot = set->value("preferredSlot").toInt(); for(int j=0; j<21; j++) @@ -370,7 +371,12 @@ void AutoConnectProfiles(void) // add it in. if (Gamepad::numJoysticks == 0) { - ConnectProfileToDevice(0); +#ifdef DEBUG_PROFILES +printf("AutoConnect: Setting up keyboard...\n"); +#endif +//NO! ConnectProfileToDevice(0); +#warning "!!! Need to set up scanning for multiple keyboard profiles !!!" + ConnectProfileToController(0, 0); return; } @@ -381,6 +387,9 @@ void AutoConnectProfiles(void) { int deviceNum = FindDeviceNumberForName(Gamepad::GetJoystickName(i)); // bool p1Overwriteable = +#ifdef DEBUG_PROFILES +printf("AutoConnect: Attempting to set up profile for device '%s' (%i)\n", Gamepad::GetJoystickName(i), deviceNum); +#endif for(int j=0; j