<translation>2468 + 1379</translation>
</message>
<message>
- <location filename="dropdown_joykey.cpp" line="52"/>
+ <location filename="dropdown_joykey.cpp" line="36"/>
+ <source>1235</source>
+ <translation>1235</translation>
+ </message>
+ <message>
+ <location filename="dropdown_joykey.cpp" line="56"/>
<source>Joykey Type:</source>
<oldsource><B>Joykey Type:</B></oldsource>
<translation>ジョイスティック→キーボード 変換方式:</translation>
</message>
<message>
- <location filename="dropdown_joykey.cpp" line="62"/>
+ <location filename="dropdown_joykey.cpp" line="68"/>
<source>Physical Buttons:</source>
<oldsource><B>Physical Buttons:</B></oldsource>
<translation>物理ボタン:</translation>
QRadioButton *joykey_type_cursor = new QRadioButton(QApplication::translate("JoykeyDialog", "Cursor keys", 0), this);
QRadioButton *joykey_type_2468 = new QRadioButton(QApplication::translate("JoykeyDialog", "2468", 0), this);
QRadioButton *joykey_type_1379 = new QRadioButton(QApplication::translate("JoykeyDialog", "2468 + 1379", 0), this);
+ QRadioButton *joykey_type_1235 = new QRadioButton(QApplication::translate("JoykeyDialog", "1235", 0), this);
switch(p_config->joy_to_key_type) {
case 0:
case 2:
joykey_type_1379->setChecked(true);
break;
+ case 3:
+ joykey_type_1235->setChecked(true);
+ break;
default:
joykey_type_cursor->setChecked(true);
p_config->joy_to_key_type = 0;
QLabel *label_joykey_type = new QLabel(QApplication::translate("JoykeyDialog", "Joykey Type:", 0), this);
layout->addWidget(label_joykey_type, 1, 0, Qt::AlignLeft);
layout->addWidget(joykey_type_cursor, 2, 0, Qt::AlignLeft);
- layout->addWidget(joykey_type_2468, 3, 0, Qt::AlignLeft);
- layout->addWidget(joykey_type_1379, 4, 0, Qt::AlignLeft);
+ layout->addWidget(joykey_type_2468, 2, 1, Qt::AlignLeft);
+ layout->addWidget(joykey_type_1379, 3, 0, Qt::AlignLeft);
+ layout->addWidget(joykey_type_1235, 3, 1, Qt::AlignLeft);
connect(joykey_type_cursor, SIGNAL(clicked()), this, SLOT(do_set_type_cursor()));
connect(joykey_type_2468, SIGNAL(clicked()), this, SLOT(do_set_type_2468()));
connect(joykey_type_1379, SIGNAL(clicked()), this, SLOT(do_set_type_1379()));
+ connect(joykey_type_1235, SIGNAL(clicked()), this, SLOT(do_set_type_1235()));
QLabel *label_buttons = new QLabel(QApplication::translate("JoykeyDialog", "Physical Buttons:", 0), this);
- layout->addWidget(label_buttons, 5, 0, Qt::AlignLeft);
+ layout->addWidget(label_buttons, 4, 0, Qt::AlignLeft);
_TCHAR tmps[32];
QString nm;
snprintf(tmps, 32, "Button#%02d to:", i + 1);
nm = QString::fromUtf8(tmps);
label_button[i]->setText(nm);
- layout->addWidget(label_button[i], (i / 4) * 2 + 6 + 0, i % 4, Qt::AlignLeft);
- layout->addWidget(js_button[i], (i / 4) * 2 + 6 + 1, i % 4, Qt::AlignLeft);
+ layout->addWidget(label_button[i], (i / 4) * 2 + 5 + 0, i % 4, Qt::AlignLeft);
+ layout->addWidget(js_button[i], (i / 4) * 2 + 5 + 1, i % 4, Qt::AlignLeft);
}
p_config->joy_to_key_type = 2;
}
+void CSP_DropDownJoykey::do_set_type_1235()
+{
+ p_config->joy_to_key_type = 3;
+}
+
case 0x01 : status[VK_NUMPAD8] = 1; break; // up
case 0x01 + 0x08: status[VK_NUMPAD9] = 1; break; // up-right
}
+ } else if(p_config->joy_to_key_type == 3) { // 1235
+ static const int vk[] = {VK_NUMPAD5, VK_NUMPAD2, VK_NUMPAD1, VK_NUMPAD3};
+ for(int i = 0; i < 4; i++) {
+ if(joy_status[0] & (1 << i)) {
+ status[vk[i]] = 1;
+ }
+ }
}
if(p_config->joy_to_key_type == 1 || p_config->joy_to_key_type == 2) {
// numpad key
numpad_5_pressed = true;
}
}
+ } else if(p_config->joy_to_key_type == 3) {
+ // numpad key
+ if(p_config->joy_to_key_numpad5 && !(joy_status[0] & 0x0f)) {
+ if(!numpad_5_pressed) {
+ status[VK_NUMPAD8] = 1;
+ numpad_5_pressed = true;
+ }
+ }
}
+
for(int i = 0; i < 16; i++) {
if(joy_status[0] & (1 << (i + 4))) {
if(p_config->joy_to_key_buttons[i] < 0 && -p_config->joy_to_key_buttons[i] < 256) {
// do not keep key pressed
if(p_config->joy_to_key_numpad5 && (i >= VK_NUMPAD1 && i <= VK_NUMPAD9)) {
key_status[i] = KEY_KEEP_FRAMES;
- if(numpad_5_pressed && (i != VK_NUMPAD5)) {
- numpad_5_pressed = false;
+ if(p_config->joy_to_key_type == 3) {
+ if(numpad_5_pressed && (i != VK_NUMPAD8)) {
+ numpad_5_pressed = false;
+ }
+ } else if((p_config->joy_to_key_type == 1) || (p_config->joy_to_key_type == 2)) {
+ if(numpad_5_pressed && (i != VK_NUMPAD5)) {
+ numpad_5_pressed = false;
+ }
}
}
}