mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-25 05:55:01 +00:00
feat: remove auto map
This commit is contained in:
parent
06cdb345bb
commit
71ea24c1d7
6 changed files with 12 additions and 24 deletions
|
@ -49,6 +49,10 @@ bool DeviceManage::connectDevice(Device::DeviceParams params)
|
||||||
|
|
||||||
void DeviceManage::updateScript(QString script)
|
void DeviceManage::updateScript(QString script)
|
||||||
{
|
{
|
||||||
|
if (m_devices.isEmpty()) {
|
||||||
|
qWarning() << "no device connect!!!";
|
||||||
|
return;
|
||||||
|
}
|
||||||
QMapIterator<QString, QPointer<Device>> i(m_devices);
|
QMapIterator<QString, QPointer<Device>> i(m_devices);
|
||||||
while (i.hasNext()) {
|
while (i.hasNext()) {
|
||||||
i.next();
|
i.next();
|
||||||
|
|
|
@ -91,11 +91,6 @@ void Dialog::initUI()
|
||||||
ui->formatBox->addItem("mp4");
|
ui->formatBox->addItem("mp4");
|
||||||
ui->formatBox->addItem("mkv");
|
ui->formatBox->addItem("mkv");
|
||||||
|
|
||||||
#ifndef Q_OS_WIN32
|
|
||||||
// game only windows
|
|
||||||
ui->gameCheck->setEnabled(false);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ui->recordPathEdt->setText(Config::getInstance().getRecordPath());
|
ui->recordPathEdt->setText(Config::getInstance().getRecordPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,18 +150,12 @@ void Dialog::on_startServerBtn_clicked()
|
||||||
params.maxSize = videoSize;
|
params.maxSize = videoSize;
|
||||||
params.bitRate = bitRate;
|
params.bitRate = bitRate;
|
||||||
// on devices with Android >= 10, the capture frame rate can be limited
|
// on devices with Android >= 10, the capture frame rate can be limited
|
||||||
params.maxFps = Config::getInstance().getMaxFps();
|
params.maxFps = static_cast<quint32>(Config::getInstance().getMaxFps());
|
||||||
params.recordFileName = absFilePath;
|
params.recordFileName = absFilePath;
|
||||||
params.closeScreen = ui->closeScreenCheck->isChecked();
|
params.closeScreen = ui->closeScreenCheck->isChecked();
|
||||||
params.useReverse = ui->useReverseCheck->isChecked();
|
params.useReverse = ui->useReverseCheck->isChecked();
|
||||||
params.display = !ui->notDisplayCheck->isChecked();
|
params.display = !ui->notDisplayCheck->isChecked();
|
||||||
if (ui->gameCheck->isChecked()) {
|
|
||||||
if (ui->gameBox->currentText().isEmpty()) {
|
|
||||||
outLog("no keymap script selected", true);
|
|
||||||
} else {
|
|
||||||
params.gameScript = getGameScript(ui->gameBox->currentText());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
m_deviceManage.connectDevice(params);
|
m_deviceManage.connectDevice(params);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -304,13 +304,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="10" colspan="2">
|
|
||||||
<widget class="QCheckBox" name="gameCheck">
|
|
||||||
<property name="text">
|
|
||||||
<string>auto enable</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="3" colspan="2">
|
<item row="2" column="3" colspan="2">
|
||||||
<widget class="QCheckBox" name="alwaysTopCheck">
|
<widget class="QCheckBox" name="alwaysTopCheck">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
|
|
@ -10,9 +10,9 @@
|
||||||
#include "mousetap/mousetap.h"
|
#include "mousetap/mousetap.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
Dialog* g_mainDlg = Q_NULLPTR;
|
static Dialog* g_mainDlg = Q_NULLPTR;
|
||||||
|
|
||||||
QtMessageHandler g_oldMessageHandler = Q_NULLPTR;
|
static QtMessageHandler g_oldMessageHandler = Q_NULLPTR;
|
||||||
void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg);
|
void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg);
|
||||||
void installTranslator();
|
void installTranslator();
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,9 @@ Here is the instruction of adding new customized mapping files.
|
||||||
|
|
||||||
- Write a customized script and put it in the `keymap` directory
|
- Write a customized script and put it in the `keymap` directory
|
||||||
- Click `refresh script` to check whether it can be found
|
- Click `refresh script` to check whether it can be found
|
||||||
|
- Select your script
|
||||||
- Connect your phone, start service and click `apply`
|
- Connect your phone, start service and click `apply`
|
||||||
- Start the game and press `~` key (left side of the number key 1) to switch to the mapping mode (It can be changed in the script as `switchkey`)
|
- Press `~` key (left side of the number key 1) to switch to the custom mapping mode (It can be changed in the script as `switchkey`)
|
||||||
- Press the ~ key again to switch back to normal mode
|
- Press the ~ key again to switch back to normal mode
|
||||||
- (For PUBG and similar games) If you want to drive cars with WASD, you need to check the `single rocker mode` in the game setting.
|
- (For PUBG and similar games) If you want to drive cars with WASD, you need to check the `single rocker mode` in the game setting.
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,9 @@ QtScrcpy可以通过USB(或通过TCP/IP)连接Android设备,并进行显示和
|
||||||
自定义按键映射操作方法如下:
|
自定义按键映射操作方法如下:
|
||||||
- 编写自定义脚本放入keymap目录
|
- 编写自定义脚本放入keymap目录
|
||||||
- 点击刷新脚本,确保脚本可以被检测到
|
- 点击刷新脚本,确保脚本可以被检测到
|
||||||
|
- 选择需要的脚本
|
||||||
- 连接手机并启动服务之后,点击应用脚本
|
- 连接手机并启动服务之后,点击应用脚本
|
||||||
- 进入游戏场景,按~键(数字键1左边)切换为游戏映射模式即可体验(具体按什么键要看你按键脚本定义的switchKey)
|
- 按~键(数字键1左边)切换为自定义映射模式即可体验(具体按什么键要看你按键脚本定义的switchKey)
|
||||||
- 再次按~键切换为正常控制模式
|
- 再次按~键切换为正常控制模式
|
||||||
- 要想wasd控制开车记得在载具设置中设置为单摇杆模式
|
- 要想wasd控制开车记得在载具设置中设置为单摇杆模式
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue