Skip to content

Commit ed3db0d

Browse files
committed
New version and update readme's
1 parent 1f0fbc4 commit ed3db0d

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

README.FR.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Vous pouvez aussi simuler le glissé via le clavier, les codes correspondant aux
6262
3. Entrez l'IP de votre PC, selectionnez `Send raw data` s'il est déselectionné, selectionnez la data rate en `Fastest` ou `Fast`.
6363
4. Réduisez la sensibilité si nécessaire (le paramètre `Sens`, dans la section `Motion`, où `100` est égal à 100% de sensibilité) dans le fichier de configuration.
6464
5. Inversez les axes si nécessaire (le paramètre `InverseX`, `InverseY` et `InverseZ`, dans la section `Motion`, où `1` signifie l'activation de l'inversion, et `0` la désactivation).
65+
5. Changez l'orientation du téléphone (le paramètre `Orientation`, dans la section `Motion`, où `1` correspond au paysage et `0` au portrait).
6566

6667

6768
Si vous avez just besoin de simuler une secousse de la manette (gyro) dans le jeu, dans ce cas il n'y a pas besoin d'installer l'application Android, appuyez sur le bouton `Shake` de la manette.

README.RU.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Uncharted 3: Иллюзии Дрейка (2011) | Кнопка "Share" (F12) д
6060
2. Установите FreePieIMU на ваш Android телефон, взяв последнюю версию в архиве [OpenTrack](https://github.com/opentrack/opentrack) или в [релизах](https://github.com/r57zone/DualShock4-emulator/releases), введите IP адрес вашего компьютера, отметьте пункт "Send raw data", если не отмечен, выберите скорость передачи данных "Fastest" или "Fast".
6161
3. Уменьшите чувствительность при необходимости (параметр `Sens`, в разделе `Motion`, где 100 это 100% чувствительности) в конфигурационном файле.
6262
4. Инвертируйте оси при необходимости (параметры `InverseX`, `InverseY` и `InverseZ`, в разделе `Motion`, где `1` это включение инверсии, а `0` выключение).
63-
63+
5. Измените ориентацию телефона (параметр `Orientation` в разделе `Motion`, где `1` — альбомная, а `0` — портретная).
6464

6565
Если в игре нужно просто потрести (гироскоп) геймпад, то нет необходимости в установке приложений для Android, просто нажмите кнопку "тряски" геймпада.
6666

Source/DS4Emulator.cpp

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,15 @@ void MotionReceiver()
5353
memset(&freePieIMU, 0, sizeof(freePieIMU));
5454
bytes_read = recvfrom(socketS, (char*)(&freePieIMU), sizeof(freePieIMU), 0, (sockaddr*)&from, &fromlen);
5555
if (bytes_read > 0) {
56-
57-
if (MotionOrientation) {
58-
// landscape mapping
56+
if (MotionOrientation) { // landscape mapping
5957
AccelZ = bytesToFloat(freePieIMU[2], freePieIMU[3], freePieIMU[4], freePieIMU[5]);
6058
AccelX = bytesToFloat(freePieIMU[6], freePieIMU[7], freePieIMU[8], freePieIMU[9]);
6159
AccelY = bytesToFloat(freePieIMU[10], freePieIMU[11], freePieIMU[12], freePieIMU[13]);
6260

6361
GyroZ = bytesToFloat(freePieIMU[14], freePieIMU[15], freePieIMU[16], freePieIMU[17]);
6462
GyroX = bytesToFloat(freePieIMU[18], freePieIMU[19], freePieIMU[20], freePieIMU[21]);
6563
GyroY = bytesToFloat(freePieIMU[22], freePieIMU[23], freePieIMU[24], freePieIMU[25]);
66-
}
67-
else {
68-
// portrait mapping
64+
} else { // portrait mapping
6965
AccelX = bytesToFloat(freePieIMU[2], freePieIMU[3], freePieIMU[4], freePieIMU[5]);
7066
AccelZ = bytesToFloat(freePieIMU[6], freePieIMU[7], freePieIMU[8], freePieIMU[9]);
7167
AccelY = bytesToFloat(freePieIMU[10], freePieIMU[11], freePieIMU[12], freePieIMU[13]);
@@ -74,9 +70,7 @@ void MotionReceiver()
7470
GyroZ = bytesToFloat(freePieIMU[18], freePieIMU[19], freePieIMU[20], freePieIMU[21]);
7571
GyroY = bytesToFloat(freePieIMU[22], freePieIMU[23], freePieIMU[24], freePieIMU[25]);
7672
}
77-
}
78-
else
79-
Sleep(SleepTimeOutMotion); // Don't overload the CPU with reading
73+
} else Sleep(SleepTimeOutMotion); // Don't overload the CPU with reading
8074
}
8175
}
8276

@@ -140,7 +134,7 @@ SHORT DeadZoneXboxAxis(SHORT StickAxis, float Percent)
140134

141135
int main(int argc, char **argv)
142136
{
143-
SetConsoleTitle("DS4Emulator 1.7.7");
137+
SetConsoleTitle("DS4Emulator 1.7.8");
144138

145139
CIniReader IniFile("Config.ini"); // Config
146140

@@ -339,6 +333,9 @@ int main(int argc, char **argv)
339333
report.sPreviousTouch[1] = { 0 };
340334
report.sCurrentTouch.bIsUpTrackingNum1 = 0x80;
341335
report.sCurrentTouch.bIsUpTrackingNum2 = 0x80;
336+
337+
//report.bBatteryLvl = 8;
338+
//report.bBatteryLvlSpecial = 32; ??? not working
342339

343340
// Xbox mode
344341
if (EmulationMode == XboxMode) {

0 commit comments

Comments
 (0)