• R/O
  • HTTP
  • SSH
  • HTTPS

common_source_project-fm7: Commit

Common Source Code Project for Qt (a.k.a for FM-7).


Commit MetaInfo

Revision3f4faf07f5527a0e4afe6620c591fc005c9b519f (tree)
Time2018-12-18 03:07:00
AuthorK.Ohta <whatisthis.sowhat@gmai...>
CommiterK.Ohta

Log Message

[UI][OSD][Qt] Apply "Joystick to Keyboard" feature.

Change Summary

Incremental Difference

--- a/source/src/qt/CMakeLists.txt
+++ b/source/src/qt/CMakeLists.txt
@@ -1,5 +1,5 @@
11 message("* qt/osd")
2-SET(THIS_LIB_VERSION 2.15.0)
2+SET(THIS_LIB_VERSION 2.16.0)
33
44 set(s_qt_osd_headers
55 osd_base.h
--- a/source/src/qt/gui/CMakeLists.txt
+++ b/source/src/qt/gui/CMakeLists.txt
@@ -1,6 +1,6 @@
11 message("* qt/gui")
22
3-set(THIS_LIB_VERSION 2.17.0)
3+set(THIS_LIB_VERSION 2.17.1)
44 #include(cotire)
55 #include(PrecompiledHeader)
66
@@ -34,6 +34,9 @@ set(s_qt_gui_headers
3434 dropdown_joystick.h
3535 dropdown_jsbutton.h
3636 dropdown_jspage.h
37+
38+ dropdown_joykey.h
39+ dropdown_joykeybutton.h
3740 dialog_set_key.h
3841 dialog_set_key_combo.h
3942 dialog_movie.h
@@ -99,6 +102,10 @@ set(s_qt_gui_srcs
99102 dropdown_joystick.cpp
100103 dropdown_jsbutton.cpp
101104 dropdown_jspage.cpp
105+
106+ dropdown_joykey.cpp
107+ dropdown_joykeybutton.cpp
108+
102109 dialog_set_key.cpp
103110 dialog_set_key_combo.cpp
104111 dialog_movie.cpp
--- a/source/src/qt/gui/csp_qt_gui.ts
+++ b/source/src/qt/gui/csp_qt_gui.ts
@@ -4,10 +4,51 @@
44 <context>
55 <name>CSP_DropDownJoysticks</name>
66 <message>
7- <location filename="menu_main.cpp" line="1194"/>
7+ <location filename="menu_main.cpp" line="1215"/>
88 <source>Configure Joysticks</source>
99 <translation>ジョイステックを設定する</translation>
1010 </message>
11+ <message>
12+ <location filename="menu_main.cpp" line="1225"/>
13+ <source>Configure Joystick to KEYBOARD</source>
14+ <translation>ジョイスティック→キーボード変換の設定</translation>
15+ </message>
16+</context>
17+<context>
18+ <name>JoykeyDialog</name>
19+ <message>
20+ <location filename="dropdown_joykey.cpp" line="28"/>
21+ <source>Use 5 key to stop</source>
22+ <oldsource>&lt;B&gt;Use 5 key to stop&lt;/B&gt;</oldsource>
23+ <translation>テンキーの「5」でカーソルを止める</translation>
24+ </message>
25+ <message>
26+ <location filename="dropdown_joykey.cpp" line="33"/>
27+ <source>Cursor keys</source>
28+ <translation>カーソルキー</translation>
29+ </message>
30+ <message>
31+ <location filename="dropdown_joykey.cpp" line="34"/>
32+ <source>2468</source>
33+ <translation>2468</translation>
34+ </message>
35+ <message>
36+ <location filename="dropdown_joykey.cpp" line="35"/>
37+ <source>2468 + 1379</source>
38+ <translation>2468 + 1379</translation>
39+ </message>
40+ <message>
41+ <location filename="dropdown_joykey.cpp" line="52"/>
42+ <source>Joykey Type:</source>
43+ <oldsource>&lt;B&gt;Joykey Type:&lt;/B&gt;</oldsource>
44+ <translation>ジョイスティック→キーボード&#x3000;変換方式:</translation>
45+ </message>
46+ <message>
47+ <location filename="dropdown_joykey.cpp" line="62"/>
48+ <source>Physical Buttons:</source>
49+ <oldsource>&lt;B&gt;Physical Buttons:&lt;/B&gt;</oldsource>
50+ <translation>物理ボタン:</translation>
51+ </message>
1152 </context>
1253 <context>
1354 <name>JoystickDialog</name>
@@ -40,7 +81,7 @@
4081 <translation>*未定義*</translation>
4182 </message>
4283 <message>
43- <location filename="menu_main.cpp" line="1219"/>
84+ <location filename="menu_main.cpp" line="1250"/>
4485 <source>Configure Keyboard</source>
4586 <translation>キーボードの設定</translation>
4687 </message>
@@ -1098,147 +1139,173 @@ Press RIGHT Application key (or another) to toggle enable/disable.</source>
10981139 <context>
10991140 <name>MenuEmulator</name>
11001141 <message>
1101- <location filename="menu_main.cpp" line="790"/>
1142+ <location filename="menu_main.cpp" line="792"/>
11021143 <source>Configure Joysticks</source>
11031144 <translation>ジョイスティックの設定</translation>
11041145 </message>
11051146 <message>
1106- <location filename="menu_main.cpp" line="791"/>
1147+ <location filename="menu_main.cpp" line="793"/>
11071148 <source>Configure assigning buttons/directions of joysticks.</source>
11081149 <translation>ジョイスティックの方向やボタンの割当を設定します。</translation>
11091150 </message>
11101151 <message>
1152+ <location filename="menu_main.cpp" line="794"/>
1153+ <source>Configure Joystick to KEYBOARD</source>
1154+ <translation>ジョイスティック→キーボード変換の設定</translation>
1155+ </message>
1156+ <message>
11111157 <location filename="menu_main.cpp" line="795"/>
1158+ <source>Configure assigning keycode to joystick buttons.
1159+This feature using Joystick #1.</source>
1160+ <oldsource>Configure assigning keycode to joystick buttons.</oldsource>
1161+ <translation>ジョイスティックからキーボードの変換を設定します。
1162+ジョイスティック1番が使用されます。</translation>
1163+ </message>
1164+ <message>
1165+ <location filename="menu_main.cpp" line="796"/>
1166+ <source>Joystick to KEYBOARD</source>
1167+ <translation>ジョイスティックをキーボードに変換する</translation>
1168+ </message>
1169+ <message>
1170+ <location filename="menu_main.cpp" line="797"/>
1171+ <source>Use Joystick axis/buttons to input keyboard.
1172+This feature using Joystick #1.</source>
1173+ <oldsource>Use Joystick axis/buttons to input keyboard.</oldsource>
1174+ <translation>ジョイスティックの方向とボタンでキーボードを入力します。
1175+ジョイスティック1番が使用されます。</translation>
1176+ </message>
1177+ <message>
1178+ <location filename="menu_main.cpp" line="801"/>
11121179 <source>ROMA-KANA Conversion</source>
11131180 <translation>ローマ字かな変換</translation>
11141181 </message>
11151182 <message>
1116- <location filename="menu_main.cpp" line="796"/>
1183+ <location filename="menu_main.cpp" line="802"/>
11171184 <source>Use romaji-kana conversion assistant of emulator.</source>
11181185 <translation>エミュレータ上のローマ字かな変換を使用します。</translation>
11191186 </message>
11201187 <message>
1121- <location filename="menu_main.cpp" line="798"/>
1188+ <location filename="menu_main.cpp" line="804"/>
11221189 <source>Emulate as FULL SPEED</source>
11231190 <translation>全速力でエミュレート</translation>
11241191 </message>
11251192 <message>
1126- <location filename="menu_main.cpp" line="799"/>
1193+ <location filename="menu_main.cpp" line="805"/>
11271194 <source>Run emulation thread without frame sync.</source>
11281195 <translation>フレーム同期を取らずに全速力でエミュレーションします。</translation>
11291196 </message>
11301197 <message>
1131- <location filename="menu_main.cpp" line="801"/>
1198+ <location filename="menu_main.cpp" line="807"/>
11321199 <source>Numpad&apos;s Enter is Fullkey&apos;s</source>
11331200 <translation>テンキーのEnterをフルキーとみなす</translation>
11341201 </message>
11351202 <message>
1136- <location filename="menu_main.cpp" line="802"/>
1203+ <location filename="menu_main.cpp" line="808"/>
11371204 <source>Numpad&apos;s enter key makes full key&apos;s enter.
11381205 Useful for some VMs.</source>
11391206 <translation>テンキー側のEnterキーを押した時に、フルキーのEnterを出力します。
11401207 いくつかのVMやいくつかの環境で有用なはずです。</translation>
11411208 </message>
11421209 <message>
1143- <location filename="menu_main.cpp" line="804"/>
1210+ <location filename="menu_main.cpp" line="810"/>
11441211 <source>Print Statistics</source>
11451212 <translation>統計を表示する</translation>
11461213 </message>
11471214 <message>
1148- <location filename="menu_main.cpp" line="805"/>
1215+ <location filename="menu_main.cpp" line="811"/>
11491216 <source>Print statistics of CPUs (or some devices).
11501217 Useful for debugging.</source>
11511218 <translation>CPU使用の統計を表示します。
11521219 デバッグに有益なはずです。</translation>
11531220 </message>
11541221 <message>
1155- <location filename="menu_main.cpp" line="808"/>
1222+ <location filename="menu_main.cpp" line="814"/>
11561223 <source>FDC: Turn ON Debug log.</source>
11571224 <translation>FDCのデバッグログを開始する。</translation>
11581225 </message>
11591226 <message>
1160- <location filename="menu_main.cpp" line="809"/>
1227+ <location filename="menu_main.cpp" line="815"/>
11611228 <source>Turn ON debug logging for FDCs.Useful to resolve issues from guest software.</source>
11621229 <translation>FDCのデバッグログを取ります。
11631230 ゲストで使用するソフトウェアの問題解決に役立つかも知れません。</translation>
11641231 </message>
11651232 <message>
1166- <location filename="menu_main.cpp" line="812"/>
1233+ <location filename="menu_main.cpp" line="818"/>
11671234 <source>Emulate cursor as</source>
11681235 <translation>カーソルキーで</translation>
11691236 </message>
11701237 <message>
1171- <location filename="menu_main.cpp" line="813"/>
1238+ <location filename="menu_main.cpp" line="819"/>
11721239 <source>Emulate cursor as ten-key.</source>
11731240 <translation>カーソルキーでテンキーをエミュレートします。</translation>
11741241 </message>
11751242 <message>
1176- <location filename="menu_main.cpp" line="814"/>
1243+ <location filename="menu_main.cpp" line="820"/>
11771244 <source>None</source>
11781245 <translation>テンキーエミュレートしない</translation>
11791246 </message>
11801247 <message>
1181- <location filename="menu_main.cpp" line="815"/>
1248+ <location filename="menu_main.cpp" line="821"/>
11821249 <source>2 4 6 8</source>
11831250 <translation>テンキーの「2 4 6 8」をエミュレート</translation>
11841251 </message>
11851252 <message>
1186- <location filename="menu_main.cpp" line="816"/>
1253+ <location filename="menu_main.cpp" line="822"/>
11871254 <source>1 2 3 5</source>
11881255 <translation>テンキーの「1 2 3 5 」をエミュレート</translation>
11891256 </message>
11901257 <message>
1191- <location filename="menu_main.cpp" line="818"/>
1258+ <location filename="menu_main.cpp" line="824"/>
11921259 <source>Emulator</source>
11931260 <translation>エミュレータ</translation>
11941261 </message>
11951262 <message>
1196- <location filename="menu_main.cpp" line="821"/>
1263+ <location filename="menu_main.cpp" line="827"/>
11971264 <source>Focus on click</source>
11981265 <translation>画面クリックでウィンドウフォーカスを固定</translation>
11991266 </message>
12001267 <message>
1201- <location filename="menu_main.cpp" line="822"/>
1268+ <location filename="menu_main.cpp" line="828"/>
12021269 <source>If set, focus with click, not mouse-over.</source>
12031270 <translation>設定すると、マウスオーバーではなく、表示画面のクリックでフォーカスします。</translation>
12041271 </message>
12051272 <message>
1206- <location filename="menu_main.cpp" line="824"/>
1273+ <location filename="menu_main.cpp" line="830"/>
12071274 <source>Configure Keyboard</source>
12081275 <translation>キーボードの設定</translation>
12091276 </message>
12101277 <message>
1211- <location filename="menu_main.cpp" line="825"/>
1278+ <location filename="menu_main.cpp" line="831"/>
12121279 <source>Set addignation of keyboard.</source>
12131280 <translation>キーの割当を設定します。</translation>
12141281 </message>
12151282 <message>
1216- <location filename="menu_main.cpp" line="827"/>
1283+ <location filename="menu_main.cpp" line="833"/>
12171284 <source>Configure movie encoding</source>
12181285 <translation>動画保存設定</translation>
12191286 </message>
12201287 <message>
1221- <location filename="menu_main.cpp" line="828"/>
1288+ <location filename="menu_main.cpp" line="834"/>
12221289 <source>Configure parameters of movie encoding.</source>
12231290 <translation>動画保存での、エンコーディングのパラメータを設定します。</translation>
12241291 </message>
12251292 <message>
1226- <location filename="menu_main.cpp" line="830"/>
1293+ <location filename="menu_main.cpp" line="836"/>
12271294 <source>Log to Console</source>
12281295 <translation>コンソールに記録</translation>
12291296 </message>
12301297 <message>
1231- <location filename="menu_main.cpp" line="831"/>
1298+ <location filename="menu_main.cpp" line="837"/>
12321299 <source>Enable logging to STDOUT if checked.</source>
12331300 <translation>チェックすると、標準出力にログが出ます。</translation>
12341301 </message>
12351302 <message>
1236- <location filename="menu_main.cpp" line="833"/>
1303+ <location filename="menu_main.cpp" line="839"/>
12371304 <source>Log to Syslog</source>
12381305 <translation>SYSLOGに記録</translation>
12391306 </message>
12401307 <message>
1241- <location filename="menu_main.cpp" line="834"/>
1308+ <location filename="menu_main.cpp" line="840"/>
12421309 <source>Enable logging to SYSTEM log.
12431310 May be having permission to system and using *nix OS.</source>
12441311 <translation>ホストのシステムログにログを記録します。
@@ -1246,12 +1313,12 @@ May be having permission to system and using *nix OS.</source>
12461313 つ*nix OSでないと使えないかもしれません。</translation>
12471314 </message>
12481315 <message>
1249- <location filename="menu_main.cpp" line="838"/>
1316+ <location filename="menu_main.cpp" line="844"/>
12501317 <source>Sound FDD Seek</source>
12511318 <translation>FDシーク音を鳴らす</translation>
12521319 </message>
12531320 <message>
1254- <location filename="menu_main.cpp" line="839"/>
1321+ <location filename="menu_main.cpp" line="845"/>
12551322 <source>Enable FDD HEAD seeking sound.
12561323 Needs sound file.
12571324 See HELP-&gt;READMEs-&gt;Bios and Key assigns</source>
@@ -1260,12 +1327,12 @@ See HELP-&gt;READMEs-&gt;Bios and Key assigns</source>
12601327 ヘルプのREADMEsの「BIOSとキー割り当て」項目をお読み下さい</translation>
12611328 </message>
12621329 <message>
1263- <location filename="menu_main.cpp" line="842"/>
1330+ <location filename="menu_main.cpp" line="848"/>
12641331 <source>Sound CMT Relay and Buttons</source>
12651332 <translation>テープのリレーと音のボタンを鳴らす</translation>
12661333 </message>
12671334 <message>
1268- <location filename="menu_main.cpp" line="843"/>
1335+ <location filename="menu_main.cpp" line="849"/>
12691336 <source>Enable CMT relay&apos;s sound and buttons&apos;s sounds.
12701337 Needs sound file.
12711338 See HELP-&gt;READMEs-&gt;Bios and Key assigns</source>
@@ -1277,38 +1344,38 @@ HELP-&gt;READMEs-&gt;BIOSとキー割当&#x3000;をお読み下さい。</transl
12771344 詳しくは、「ヘルプ」→「READMEs」→「BIOSとキー割り当て」の項目をお読みください。</translation>
12781345 </message>
12791346 <message>
1280- <location filename="menu_main.cpp" line="846"/>
1281- <location filename="menu_main.cpp" line="848"/>
1347+ <location filename="menu_main.cpp" line="852"/>
1348+ <location filename="menu_main.cpp" line="854"/>
12821349 <source>Per Device</source>
12831350 <translation>デバイスごと</translation>
12841351 </message>
12851352 <message>
1286- <location filename="menu_main.cpp" line="850"/>
1353+ <location filename="menu_main.cpp" line="856"/>
12871354 <source>Video Platform(need restart)</source>
12881355 <translation>画面表示基盤(要再起動)</translation>
12891356 </message>
12901357 <message>
1291- <location filename="menu_main.cpp" line="852"/>
1358+ <location filename="menu_main.cpp" line="858"/>
12921359 <source>OpenGL ES v2.0</source>
12931360 <translation></translation>
12941361 </message>
12951362 <message>
1296- <location filename="menu_main.cpp" line="853"/>
1363+ <location filename="menu_main.cpp" line="859"/>
12971364 <source>OpenGLv3.0</source>
12981365 <translation>OpenGL v3.0</translation>
12991366 </message>
13001367 <message>
1301- <location filename="menu_main.cpp" line="854"/>
1368+ <location filename="menu_main.cpp" line="860"/>
13021369 <source>OpenGLv2.0</source>
13031370 <translation>OpenGL v2.0</translation>
13041371 </message>
13051372 <message>
1306- <location filename="menu_main.cpp" line="855"/>
1373+ <location filename="menu_main.cpp" line="861"/>
13071374 <source>OpenGL(Core profile)</source>
13081375 <translation>OpenGL(コアプロファイル)</translation>
13091376 </message>
13101377 <message>
1311- <location filename="menu_main.cpp" line="857"/>
1378+ <location filename="menu_main.cpp" line="863"/>
13121379 <source>Using OpenGL ES v2.0.
13131380 This is recommanded.
13141381 If changed, need to restart this emulator.</source>
@@ -1317,7 +1384,7 @@ If changed, need to restart this emulator.</source>
13171384 変更した場合、エミュレータ自体の再起動が必要です。</translation>
13181385 </message>
13191386 <message>
1320- <location filename="menu_main.cpp" line="858"/>
1387+ <location filename="menu_main.cpp" line="864"/>
13211388 <source>Using OpenGL v3.0(MAIN).
13221389 This is recommanded.
13231390 If changed, need to restart this emulator.</source>
@@ -1326,7 +1393,7 @@ If changed, need to restart this emulator.</source>
13261393 変更した場合は、エミュレータの再起動が必要です。</translation>
13271394 </message>
13281395 <message>
1329- <location filename="menu_main.cpp" line="859"/>
1396+ <location filename="menu_main.cpp" line="865"/>
13301397 <source>Using OpenGLv2.
13311398 This is fallback of some systems.
13321399 If changed, need to restart this emulator.</source>
@@ -1336,7 +1403,7 @@ If changed, need to restart this emulator.</source>
13361403 変更した場合は、エミュレータの再起動が必要です。</translation>
13371404 </message>
13381405 <message>
1339- <location filename="menu_main.cpp" line="860"/>
1406+ <location filename="menu_main.cpp" line="866"/>
13401407 <source>Using OpenGL core profile.
13411408 This still not implement.
13421409 If changed, need to restart this emulator.</source>
@@ -1345,36 +1412,36 @@ If changed, need to restart this emulator.</source>
13451412 変更した場合は、エミュレータの再起動が必要です。</translation>
13461413 </message>
13471414 <message>
1348- <location filename="menu_main.cpp" line="862"/>
1415+ <location filename="menu_main.cpp" line="868"/>
13491416 <source>Show Virtual Medias.</source>
13501417 <translatorcomment>仮想メディア一覧を表示する。</translatorcomment>
13511418 <translation>仮想メディアを表示する</translation>
13521419 </message>
13531420 <message>
1354- <location filename="menu_main.cpp" line="863"/>
1421+ <location filename="menu_main.cpp" line="869"/>
13551422 <source>None.</source>
13561423 <translatorcomment>表示しない</translatorcomment>
13571424 <translation>表示しない</translation>
13581425 </message>
13591426 <message>
1360- <location filename="menu_main.cpp" line="864"/>
1427+ <location filename="menu_main.cpp" line="870"/>
13611428 <source>Upper.</source>
13621429 <translatorcomment>上側</translatorcomment>
13631430 <translation>上に表示する</translation>
13641431 </message>
13651432 <message>
1366- <location filename="menu_main.cpp" line="865"/>
1433+ <location filename="menu_main.cpp" line="871"/>
13671434 <source>Lower.</source>
13681435 <translatorcomment>下側</translatorcomment>
13691436 <translation>下に表示する</translation>
13701437 </message>
13711438 <message>
1372- <location filename="menu_main.cpp" line="868"/>
1439+ <location filename="menu_main.cpp" line="874"/>
13731440 <source>View Log</source>
13741441 <translation>ログを見る</translation>
13751442 </message>
13761443 <message>
1377- <location filename="menu_main.cpp" line="869"/>
1444+ <location filename="menu_main.cpp" line="875"/>
13781445 <source>View emulator logs with a dialog.</source>
13791446 <translation>エミュレータのログを、ダイアログで見ます。</translation>
13801447 </message>
@@ -1382,22 +1449,22 @@ If changed, need to restart this emulator.</source>
13821449 <context>
13831450 <name>MenuHDD</name>
13841451 <message>
1385- <location filename="menu_harddisk.cpp" line="41"/>
1452+ <location filename="menu_harddisk.cpp" line="42"/>
13861453 <source>Mount</source>
13871454 <translation>マウントする</translation>
13881455 </message>
13891456 <message>
1390- <location filename="menu_harddisk.cpp" line="42"/>
1457+ <location filename="menu_harddisk.cpp" line="43"/>
13911458 <source>Mount virtual hard disk file.</source>
13921459 <translation>仮想ハードディスクをつないでマウントします。</translation>
13931460 </message>
13941461 <message>
1395- <location filename="menu_harddisk.cpp" line="44"/>
1462+ <location filename="menu_harddisk.cpp" line="45"/>
13961463 <source>Unmount</source>
13971464 <translation>はずす</translation>
13981465 </message>
13991466 <message>
1400- <location filename="menu_harddisk.cpp" line="45"/>
1467+ <location filename="menu_harddisk.cpp" line="46"/>
14011468 <source>Unmount virtual hard disk.</source>
14021469 <translation>仮想ハードディスクを取り外します。</translation>
14031470 </message>
@@ -1405,129 +1472,129 @@ If changed, need to restart this emulator.</source>
14051472 <context>
14061473 <name>MenuHelp</name>
14071474 <message>
1408- <location filename="menu_main.cpp" line="1226"/>
1475+ <location filename="menu_main.cpp" line="1257"/>
14091476 <source>Help</source>
14101477 <translation>ヘルプ</translation>
14111478 </message>
14121479 <message>
1413- <location filename="menu_main.cpp" line="1227"/>
1480+ <location filename="menu_main.cpp" line="1258"/>
14141481 <source>About Qt</source>
14151482 <translation>Qtについて</translation>
14161483 </message>
14171484 <message>
1418- <location filename="menu_main.cpp" line="1228"/>
1485+ <location filename="menu_main.cpp" line="1259"/>
14191486 <source>Display Qt version.</source>
14201487 <translation>Qtのヴァージョンを表示します。</translation>
14211488 </message>
14221489 <message>
1423- <location filename="menu_main.cpp" line="1231"/>
1490+ <location filename="menu_main.cpp" line="1262"/>
14241491 <source>About...</source>
14251492 <translation>このソフトについて...</translation>
14261493 </message>
14271494 <message>
1428- <location filename="menu_main.cpp" line="1233"/>
1495+ <location filename="menu_main.cpp" line="1264"/>
14291496 <source>About this emulator.</source>
14301497 <translation>このエミュレータについて。
14311498 クレジット表記などです。</translation>
14321499 </message>
14331500 <message>
1434- <location filename="menu_main.cpp" line="1235"/>
1501+ <location filename="menu_main.cpp" line="1266"/>
14351502 <source>READMEs</source>
14361503 <translation>READMEs</translation>
14371504 </message>
14381505 <message>
1439- <location filename="menu_main.cpp" line="1237"/>
1506+ <location filename="menu_main.cpp" line="1268"/>
14401507 <source>General Document</source>
14411508 <translation>総合的な文書</translation>
14421509 </message>
14431510 <message>
1444- <location filename="menu_main.cpp" line="1238"/>
1511+ <location filename="menu_main.cpp" line="1269"/>
14451512 <source>About Qt ports</source>
14461513 <translation>Qt移植版について(英語)</translation>
14471514 </message>
14481515 <message>
1449- <location filename="menu_main.cpp" line="1239"/>
1516+ <location filename="menu_main.cpp" line="1270"/>
14501517 <source>About Qt ports (Japanese).</source>
14511518 <translation>Qt移植版について(日本語)。</translation>
14521519 </message>
14531520 <message>
1454- <location filename="menu_main.cpp" line="1240"/>
1521+ <location filename="menu_main.cpp" line="1271"/>
14551522 <source>By Mr. Umaiboux.</source>
14561523 <translatorcomment>Umaibouxさんによる文書</translatorcomment>
14571524 <translation>Umaibouxさんによる文書</translation>
14581525 </message>
14591526 <message>
1460- <location filename="menu_main.cpp" line="1241"/>
1527+ <location filename="menu_main.cpp" line="1272"/>
14611528 <source>By Mr. tanam</source>
14621529 <translation>Tanamさんによる文書</translation>
14631530 </message>
14641531 <message>
1465- <location filename="menu_main.cpp" line="1242"/>
1532+ <location filename="menu_main.cpp" line="1273"/>
14661533 <source>About eFM-7/8/77/AV.</source>
14671534 <translation>eFM-7/8/77/AVについて。</translation>
14681535 </message>
14691536 <message>
1470- <location filename="menu_main.cpp" line="1243"/>
1537+ <location filename="menu_main.cpp" line="1274"/>
14711538 <source>About eFM-7/8/77/AV (Japanese).</source>
14721539 <translation>eFM-7/8/77/AVについて(日本語)。</translation>
14731540 </message>
14741541 <message>
1475- <location filename="menu_main.cpp" line="1244"/>
1542+ <location filename="menu_main.cpp" line="1275"/>
14761543 <source>FAQs(English)</source>
14771544 <translation>FAQs(英語)</translation>
14781545 </message>
14791546 <message>
1480- <location filename="menu_main.cpp" line="1245"/>
1547+ <location filename="menu_main.cpp" line="1276"/>
14811548 <source>FAQs(Japanese)</source>
14821549 <translation>FAQs(日本語)</translation>
14831550 </message>
14841551 <message>
1485- <location filename="menu_main.cpp" line="1246"/>
1552+ <location filename="menu_main.cpp" line="1277"/>
14861553 <source>BIOS and Key assigns</source>
14871554 <translation>BIOSとキー割り当てについて</translation>
14881555 </message>
14891556 <message>
1490- <location filename="menu_main.cpp" line="1248"/>
1557+ <location filename="menu_main.cpp" line="1279"/>
14911558 <source>Histories</source>
14921559 <translation>履歴・歴史</translation>
14931560 </message>
14941561 <message>
1495- <location filename="menu_main.cpp" line="1249"/>
1562+ <location filename="menu_main.cpp" line="1280"/>
14961563 <source>General History</source>
14971564 <translation>全体の歴史</translation>
14981565 </message>
14991566 <message>
1500- <location filename="menu_main.cpp" line="1250"/>
1567+ <location filename="menu_main.cpp" line="1281"/>
15011568 <source>Release Note</source>
15021569 <translation>リリースノート</translation>
15031570 </message>
15041571 <message>
1505- <location filename="menu_main.cpp" line="1251"/>
1572+ <location filename="menu_main.cpp" line="1282"/>
15061573 <source>Change Log</source>
15071574 <translation>チェンジログ</translation>
15081575 </message>
15091576 <message>
1510- <location filename="menu_main.cpp" line="1252"/>
1577+ <location filename="menu_main.cpp" line="1283"/>
15111578 <source>History by Tanam</source>
15121579 <translation>Tanamさん部分の履歴</translation>
15131580 </message>
15141581 <message>
1515- <location filename="menu_main.cpp" line="1254"/>
1582+ <location filename="menu_main.cpp" line="1285"/>
15161583 <source>Show License</source>
15171584 <translation>ライセンス</translation>
15181585 </message>
15191586 <message>
1520- <location filename="menu_main.cpp" line="1255"/>
1587+ <location filename="menu_main.cpp" line="1286"/>
15211588 <source>Show general license (GPLv2).</source>
15221589 <translation>ライセンスを読みます。GPL2です。</translation>
15231590 </message>
15241591 <message>
1525- <location filename="menu_main.cpp" line="1256"/>
1592+ <location filename="menu_main.cpp" line="1287"/>
15261593 <source>Show License (Japanese)</source>
15271594 <translation>ライセンス(日本語)</translation>
15281595 </message>
15291596 <message>
1530- <location filename="menu_main.cpp" line="1257"/>
1597+ <location filename="menu_main.cpp" line="1288"/>
15311598 <source>Show general license (GPLv2).
15321599 Translated to Japanese.</source>
15331600 <translation>日本語に翻訳されたライセンスを読みます(GPL2)。</translation>
@@ -1536,54 +1603,54 @@ Translated to Japanese.</source>
15361603 <context>
15371604 <name>MenuMachine</name>
15381605 <message>
1539- <location filename="menu_main.cpp" line="1268"/>
1606+ <location filename="menu_main.cpp" line="1299"/>
15401607 <source>Machine</source>
15411608 <translation>仮想マシン</translation>
15421609 </message>
15431610 <message>
1544- <location filename="menu_main.cpp" line="1270"/>
1611+ <location filename="menu_main.cpp" line="1301"/>
15451612 <source>Device Type</source>
15461613 <translation>デバイス</translation>
15471614 </message>
15481615 <message>
1549- <location filename="menu_main.cpp" line="1278"/>
1616+ <location filename="menu_main.cpp" line="1309"/>
15501617 <source>Sound Cards</source>
15511618 <translation>サウンドカード</translation>
15521619 </message>
15531620 <message>
1554- <location filename="menu_main.cpp" line="1286"/>
1621+ <location filename="menu_main.cpp" line="1317"/>
15551622 <source>Drive Type</source>
15561623 <translation>ドライブタイプ</translation>
15571624 </message>
15581625 <message>
1559- <location filename="menu_main.cpp" line="1294"/>
1626+ <location filename="menu_main.cpp" line="1325"/>
15601627 <source>Printer (Need RESET)</source>
15611628 <translation>プリンタ(リセットが必要)</translation>
15621629 </message>
15631630 <message>
1564- <location filename="menu_main.cpp" line="1296"/>
1631+ <location filename="menu_main.cpp" line="1327"/>
15651632 <source>Dump to File</source>
15661633 <translation>ファイルに書き込む</translation>
15671634 </message>
15681635 <message>
1569- <location filename="menu_main.cpp" line="1297"/>
1636+ <location filename="menu_main.cpp" line="1328"/>
15701637 <source>Dump printer output to file.
15711638 Maybe output only ascii text.</source>
15721639 <translation>プリンタ出力をファイルに書き込みます。
15731640 書き込まれるのは、多分、アスキーテキストだけです。</translation>
15741641 </message>
15751642 <message>
1576- <location filename="menu_main.cpp" line="1301"/>
1643+ <location filename="menu_main.cpp" line="1332"/>
15771644 <source>Printer</source>
15781645 <translation>プリンター</translation>
15791646 </message>
15801647 <message>
1581- <location filename="menu_main.cpp" line="1306"/>
1648+ <location filename="menu_main.cpp" line="1337"/>
15821649 <source>Not Connect</source>
15831650 <translation>未接続</translation>
15841651 </message>
15851652 <message>
1586- <location filename="menu_main.cpp" line="1307"/>
1653+ <location filename="menu_main.cpp" line="1338"/>
15871654 <source>None devices connect to printer port.</source>
15881655 <translation>プリンタポートに何も繋がってない状態です。</translation>
15891656 </message>
@@ -1912,7 +1979,7 @@ You *can* write datas to this media.</source>
19121979 <translation>バイナリ</translation>
19131980 </message>
19141981 <message>
1915- <location filename="util_fd.cpp" line="125"/>
1982+ <location filename="util_fd.cpp" line="107"/>
19161983 <source>FDD</source>
19171984 <translation>FD</translation>
19181985 </message>
@@ -1931,7 +1998,7 @@ You *can* write datas to this media.</source>
19311998 <translation type="vanished">仮想ハードディスクを取り外す</translation>
19321999 </message>
19332000 <message>
1934- <location filename="util_hdd.cpp" line="72"/>
2001+ <location filename="util_hdd.cpp" line="58"/>
19352002 <source>HDD</source>
19362003 <translation>HD</translation>
19372004 </message>
--- /dev/null
+++ b/source/src/qt/gui/dropdown_joykey.cpp
@@ -0,0 +1,107 @@
1+/*
2+ * Common Source Project/ Qt
3+ * (C) 2015 K.Ohta <whatisthis.sowhat _at_ gmail.com>
4+ * Qt: Menu->Emulator->Define Strings
5+ * History: Feb 23, 2016 : Initial
6+ */
7+
8+//#include "osd.h"
9+#include <QApplication>
10+#include <QRadioButton>
11+#include <QCheckBox>
12+#include <QLabel>
13+#include "config.h"
14+
15+#include "dropdown_keyset.h"
16+#include "dropdown_joykey.h"
17+#include "dropdown_joykeybutton.h"
18+
19+CSP_DropDownJoykey::CSP_DropDownJoykey(QWidget *parent, QStringList *lst, USING_FLAGS *p) : QWidget(parent)
20+{
21+ p_wid = parent;
22+ using_flags = p;
23+ p_config = p->get_config_ptr();
24+
25+ layout = new QGridLayout(this);
26+ int i;
27+
28+ QCheckBox *numpad5 = new QCheckBox(QApplication::translate("JoykeyDialog", "Use 5 key to stop", 0), this);
29+ connect(numpad5, SIGNAL(toggled(bool)), this, SLOT(do_set_check_numpad5(bool)));
30+ layout->addWidget(numpad5, 0, 0, Qt::AlignLeft);
31+ numpad5->setChecked(p_config->joy_to_key_numpad5);
32+
33+ QRadioButton *joykey_type_cursor = new QRadioButton(QApplication::translate("JoykeyDialog", "Cursor keys", 0), this);
34+ QRadioButton *joykey_type_2468 = new QRadioButton(QApplication::translate("JoykeyDialog", "2468", 0), this);
35+ QRadioButton *joykey_type_1379 = new QRadioButton(QApplication::translate("JoykeyDialog", "2468 + 1379", 0), this);
36+
37+ switch(p_config->joy_to_key_type) {
38+ case 0:
39+ joykey_type_cursor->setChecked(true);
40+ break;
41+ case 1:
42+ joykey_type_2468->setChecked(true);
43+ break;
44+ case 2:
45+ joykey_type_1379->setChecked(true);
46+ break;
47+ default:
48+ joykey_type_cursor->setChecked(true);
49+ p_config->joy_to_key_type = 0;
50+ break;
51+ }
52+ QLabel *label_joykey_type = new QLabel(QApplication::translate("JoykeyDialog", "Joykey Type:", 0), this);
53+ layout->addWidget(label_joykey_type, 1, 0, Qt::AlignLeft);
54+ layout->addWidget(joykey_type_cursor, 2, 0, Qt::AlignLeft);
55+ layout->addWidget(joykey_type_2468, 3, 0, Qt::AlignLeft);
56+ layout->addWidget(joykey_type_1379, 4, 0, Qt::AlignLeft);
57+
58+ connect(joykey_type_cursor, SIGNAL(clicked()), this, SLOT(do_set_type_cursor()));
59+ connect(joykey_type_2468, SIGNAL(clicked()), this, SLOT(do_set_type_2468()));
60+ connect(joykey_type_1379, SIGNAL(clicked()), this, SLOT(do_set_type_1379()));
61+
62+ QLabel *label_buttons = new QLabel(QApplication::translate("JoykeyDialog", "Physical Buttons:", 0), this);
63+ layout->addWidget(label_buttons, 5, 0, Qt::AlignLeft);
64+
65+ _TCHAR tmps[32];
66+ QString nm;
67+ for(i = 0; i < 12; i++) {
68+ memset(tmps, 0x00, sizeof(char) * 20);
69+ label_button[i] = new QLabel(this);
70+ js_button[i] = new CSP_DropDownJoykeyButton(p, this, lst, i);
71+ snprintf(tmps, 32, "Button#%02d to:", i + 1);
72+ nm = QString::fromUtf8(tmps);
73+ label_button[i]->setText(nm);
74+ layout->addWidget(label_button[i], (i / 4) * 2 + 6 + 0, i % 4, Qt::AlignLeft);
75+ layout->addWidget(js_button[i], (i / 4) * 2 + 6 + 1, i % 4, Qt::AlignLeft);
76+ }
77+
78+
79+ if(p_wid == NULL) this->setWindowIcon(QIcon(":/icon_gamepad.png"));
80+ this->setLayout(layout);
81+ this->show();
82+}
83+
84+CSP_DropDownJoykey::~CSP_DropDownJoykey()
85+{
86+}
87+
88+void CSP_DropDownJoykey::do_set_check_numpad5(bool n)
89+{
90+ p_config->joy_to_key_numpad5 = n;
91+}
92+
93+void CSP_DropDownJoykey::do_set_type_cursor()
94+{
95+ p_config->joy_to_key_type = 0;
96+}
97+
98+void CSP_DropDownJoykey::do_set_type_2468()
99+{
100+ p_config->joy_to_key_type = 1;
101+}
102+
103+void CSP_DropDownJoykey::do_set_type_1379()
104+{
105+ p_config->joy_to_key_type = 2;
106+}
107+
--- /dev/null
+++ b/source/src/qt/gui/dropdown_joykey.h
@@ -0,0 +1,50 @@
1+/*
2+ * Common Source Project/ Qt
3+ * (C) 2015 K.Ohta <whatisthis.sowhat _at_ gmail.com>
4+ * Qt: Menu->Emulator->Define Strings
5+ * History: Feb 23, 2016 : Initial
6+ */
7+
8+#ifndef _CSP_DROPDOWN_JOYKEY_H
9+#define _CSP_DROPDOWN_JOYKEY_H
10+
11+#include <QWidget>
12+#include <QStringList>
13+#include <QString>
14+#include <QGridLayout>
15+#include "config.h"
16+#include "common.h"
17+#include "menu_flags.h"
18+
19+
20+QT_BEGIN_NAMESPACE
21+class QLabel;
22+class CSP_DropDownJoykeyButton;
23+
24+class DLL_PREFIX CSP_DropDownJoykey: public QWidget {
25+ Q_OBJECT
26+protected:
27+ config_t *p_config;
28+ QWidget *p_wid;
29+ QWidget *window;
30+ QGridLayout *layout;
31+ USING_FLAGS *using_flags;
32+
33+ QLabel *label_button[12];
34+ CSP_DropDownJoykeyButton *js_button[12];
35+public:
36+ CSP_DropDownJoykey(QWidget *parent, QStringList *lst, USING_FLAGS *p);
37+ ~CSP_DropDownJoykey();
38+
39+public slots:
40+ void do_set_check_numpad5(bool n);
41+ void do_set_type_cursor();
42+ void do_set_type_2468();
43+ void do_set_type_1379();
44+
45+signals:
46+
47+};
48+
49+QT_END_NAMESPACE
50+#endif //#ifndef _CSP_DROPDOWN_JOYKEY_H
--- /dev/null
+++ b/source/src/qt/gui/dropdown_joykeybutton.cpp
@@ -0,0 +1,50 @@
1+/*
2+ * Common Source Project/ Qt
3+ * (C) 2015 K.Ohta <whatisthis.sowhat _at_ gmail.com>
4+ * Qt: Menu->Emulator->Define Strings
5+ * History: Feb 23, 2016 : Initial
6+ */
7+
8+#include <QVariant>
9+#include <QApplication>
10+#include "dropdown_keytables.h"
11+#include "dropdown_joykeybutton.h"
12+#include "menu_flags.h"
13+
14+CSP_DropDownJoykeyButton::CSP_DropDownJoykeyButton(USING_FLAGS *p, QWidget *parent, QStringList *lst, int button_num) : QWidget(parent)
15+{
16+ p_wid = parent;
17+ using_flags = p;
18+ p_config = p->get_config_ptr();
19+
20+ bind_button = button_num;
21+ layout = new QHBoxLayout(this);
22+ combo = new QComboBox(this);
23+
24+ for(int i = 0; i < 256; i++) {
25+ if(default_key_table_106_QtScan[i].vk == 0xffffffff) break;
26+ combo->addItem(QString::fromUtf8(default_key_table_106_QtScan[i].name), QVariant((int)default_key_table_106_QtScan[i].vk));
27+ }
28+ connect(combo, SIGNAL(activated(int)), this, SLOT(do_select(int)));
29+ if((button_num < 16) && (button_num >= 0)) {
30+ for(int i = 0; i < combo->count(); i++) {
31+ if(p_config->joy_to_key_buttons[button_num] == default_key_table_106_QtScan[i].vk) {
32+ combo->setCurrentIndex(i);
33+ break;
34+ }
35+ }
36+ }
37+ layout->addWidget(combo);
38+ this->setLayout(layout);
39+}
40+
41+CSP_DropDownJoykeyButton::~CSP_DropDownJoykeyButton()
42+{
43+}
44+
45+void CSP_DropDownJoykeyButton::do_select(int idx)
46+{
47+ int vk = default_key_table_106_QtScan[idx].vk;
48+ p_config->joy_to_key_buttons[bind_button] = -vk;
49+}
50+
--- /dev/null
+++ b/source/src/qt/gui/dropdown_joykeybutton.h
@@ -0,0 +1,41 @@
1+/*
2+ * Common Source Project/ Qt
3+ * (C) 2015 K.Ohta <whatisthis.sowhat _at_ gmail.com>
4+ * Qt: Menu->Emulator->Define Strings
5+ * History: 18 Dec, 2018 : Initial
6+ */
7+
8+#ifndef _CSP_QT_DROPDOWN_JOYKEY_BUTTON_H
9+#define _CSP_QT_DROPDOWN_JOYKEY_BUTTON_H
10+
11+#include "config.h"
12+#include <QString>
13+#include <QStringList>
14+#include <QComboBox>
15+#include <QWidget>
16+#include <QHBoxLayout>
17+
18+#include "dropdown_keytables.h"
19+
20+class USING_FLAGS;
21+
22+class DLL_PREFIX CSP_DropDownJoykeyButton: public QWidget {
23+ Q_OBJECT;
24+protected:
25+ QWidget *p_wid;
26+ config_t *p_config;
27+ QHBoxLayout *layout;
28+ QComboBox *combo;
29+
30+ int bind_button;
31+ USING_FLAGS *using_flags;
32+public:
33+ CSP_DropDownJoykeyButton(USING_FLAGS *p, QWidget *parent = 0, QStringList *lst = 0, int button_num = 0);
34+ ~CSP_DropDownJoykeyButton();
35+public slots:
36+ void do_select(int index);
37+signals:
38+
39+};
40+
41+#endif //_CSP_QT_DROPDOWN_JOYKEY_BUTTON_H
--- a/source/src/qt/gui/dropdown_jsbutton.cpp
+++ b/source/src/qt/gui/dropdown_jsbutton.cpp
@@ -23,7 +23,7 @@ CSP_DropDownJSButton::CSP_DropDownJSButton(USING_FLAGS *p, QWidget *parent, QStr
2323 layout = new QHBoxLayout(this);
2424 combo = new QComboBox(this);
2525 int i;
26- for(i = 0; i < 16; i++) {
26+ for(i = 0; i < (sizeof(joystick_define_tbl) / sizeof(keydef_table_t)) ; i++) {
2727 combo->addItem(QString::fromUtf8(joystick_define_tbl[i].name));
2828 }
2929 if(lst != NULL) combo->addItems(*lst);
--- a/source/src/qt/gui/dropdown_jspage.cpp
+++ b/source/src/qt/gui/dropdown_jspage.cpp
@@ -53,8 +53,8 @@ CSP_DropDownJSPage::CSP_DropDownJSPage(USING_FLAGS *pp, QWidget *parent, QString
5353 }
5454 }
5555 this->setLayout(layout);
56- connect(this, SIGNAL(sig_select_js_button(int, int, int)), parent, SLOT(do_set_js_button(int, int, int)));
57- connect(this, SIGNAL(sig_select_js_button_idx(int, int, int)), parent, SLOT(do_set_js_button_idx(int, int, int)));
56+ connect(this, SIGNAL(sig_set_js_button(int, int, int)), parent, SLOT(do_set_js_button(int, int, int)));
57+ connect(this, SIGNAL(sig_set_js_button_idx(int, int, int)), parent, SLOT(do_set_js_button_idx(int, int, int)));
5858 }
5959
6060 CSP_DropDownJSPage::~CSP_DropDownJSPage()
@@ -62,46 +62,46 @@ CSP_DropDownJSPage::~CSP_DropDownJSPage()
6262 }
6363
6464
65-void CSP_DropDownJSPage::do_select_up(int index)
65+void CSP_DropDownJSPage::do_select_common(int index, int axes)
6666 {
6767 if(index < 16) {
68- emit sig_select_js_button(bind_jsnum, 0, joystick_define_tbl[index].scan);
68+ emit sig_set_js_button(bind_jsnum, axes, joystick_define_tbl[index].scan);
69+ } else if(index < 20) {
70+ emit sig_set_js_button(bind_jsnum, axes, ((joystick_define_tbl[index - 16].scan) >> 20) | ((index - 16 + 1) << 5));
71+ } else if(index < 24) {
72+ emit sig_set_js_button(bind_jsnum, axes, ((joystick_define_tbl[index - 16].scan) >> 24) | ((index - 16 + 1) << 5));
73+ } else {
74+ emit sig_set_js_button_idx(bind_jsnum, axes, -(index - 24));
6975 }
70- emit sig_select_js_button_idx(bind_jsnum, 0, -(index - 16));
76+}
77+void CSP_DropDownJSPage::do_select_up(int index)
78+{
79+ do_select_common(index, 0);
7180 }
7281
7382 void CSP_DropDownJSPage::do_select_down(int index)
7483 {
75- if(index < 16) {
76- emit sig_select_js_button(bind_jsnum, 1, joystick_define_tbl[index].scan);
77- }
78- emit sig_select_js_button_idx(bind_jsnum, 1, -(index - 16));
84+ do_select_common(index, 1);
7985 }
8086
8187 void CSP_DropDownJSPage::do_select_left(int index)
8288 {
83- if(index < 16) {
84- emit sig_select_js_button(bind_jsnum, 2, joystick_define_tbl[index].scan);
85- }
86- emit sig_select_js_button_idx(bind_jsnum, 2, -(index - 16));
89+ do_select_common(index, 2);
8790 }
8891
8992 void CSP_DropDownJSPage::do_select_right(int index)
9093 {
91- if(index < 16) {
92- emit sig_select_js_button(bind_jsnum, 3, joystick_define_tbl[index].scan);
93- }
94- emit sig_select_js_button_idx(bind_jsnum, 3, -(index - 16));
94+ do_select_common(index, 3);
9595 }
9696
9797 void CSP_DropDownJSPage::do_select_js_button(int jsnum, int button, int scan)
9898 {
9999 //printf("Select: %d %d %d\n", jsnum, button, scan);
100- emit sig_select_js_button(jsnum, button, scan);
100+ emit sig_set_js_button(jsnum, button, scan);
101101 }
102102
103103 void CSP_DropDownJSPage::do_select_js_button_idx(int jsnum, int button, int scan)
104104 {
105- emit sig_select_js_button_idx(jsnum, button, scan);
105+ emit sig_set_js_button_idx(jsnum, button, scan);
106106 //printf("Select_Idx: %d %d %d\n", jsnum, button, scan);
107107 }
--- a/source/src/qt/gui/dropdown_jspage.h
+++ b/source/src/qt/gui/dropdown_jspage.h
@@ -35,6 +35,7 @@ protected:
3535 QLabel *label_button[12];
3636 int bind_jsnum;
3737 USING_FLAGS *using_flags;
38+ void do_select_common(int index, int axes);
3839 public:
3940 CSP_DropDownJSPage(USING_FLAGS *pp, QWidget *parent = 0, QStringList *lst = 0, int jsnum = 0);
4041 ~CSP_DropDownJSPage();
@@ -47,8 +48,8 @@ public slots:
4748 void do_select_js_button(int jsnum, int button_num, int assigned_value);
4849 void do_select_js_button_idx(int jsnum, int button_num, int assigned_value);
4950 signals:
50- int sig_select_js_button(int jsnum, int button_num, int assigned_value);
51- int sig_select_js_button_idx(int jsnum, int button_num, int assigned_value);
51+ int sig_set_js_button(int jsnum, int button_num, int assigned_value);
52+ int sig_set_js_button_idx(int jsnum, int button_num, int assigned_value);
5253 };
5354
5455 QT_END_NAMESPACE
--- a/source/src/qt/gui/dropdown_keyset.h
+++ b/source/src/qt/gui/dropdown_keyset.h
@@ -17,22 +17,36 @@
1717 QT_BEGIN_NAMESPACE
1818
1919 const keydef_table_t joystick_define_tbl[] = {
20- {0x80000000, 0x00000001, "↓ (Joystick)"},
21- {0x80000000, 0x00000002, "↑ (Joystick)"},
22- {0x80000000, 0x00000004, "→ (Joystick)"},
23- {0x80000000, 0x00000008, "← (Joystick)"},
24- {0x80000000, 0x00000010, "△ (Joystick)"},
25- {0x80000000, 0x00000020, "○ (Joystick)"},
26- {0x80000000, 0x00000040, "× (Joystick)"},
27- {0x80000000, 0x00000080, "□ (Joystick)"},
28- {0x80000000, 0x00000100, "L2 (Joystick)"},
29- {0x80000000, 0x00000200, "R2 (Joystick)"},
30- {0x80000000, 0x00000400, "L1 (Joystick)"},
31- {0x80000000, 0x00000800, "R1 (Joystick)"},
32- {0x80000000, 0x00001000, "SEL(Joystick)"},
33- {0x80000000, 0x00002000, "RUN(Joystick)"},
34- {0x80000000, 0x00004000, "L3 (Joystick)"},
35- {0x80000000, 0x00008000, "R3 (Joystick)"},
20+ {0x80000000, 0x00000001, "↓ (JS DOWN )"},
21+ {0x80000000, 0x00000002, "↑ (JS UP )"},
22+ {0x80000000, 0x00000004, "→ (JS RIGHT)"},
23+ {0x80000000, 0x00000008, "← (JS LEFT )"},
24+ {0x80000000, 0x00000010, "△ (JS BUTTON 1)"},
25+ {0x80000000, 0x00000020, "○ (JS BUTTON 2)"},
26+ {0x80000000, 0x00000040, "× (JS BUTTON 3)"},
27+ {0x80000000, 0x00000080, "□ (JS BUTTON 4)"},
28+ {0x80000000, 0x00000100, "L2 (JS BUTTON 5)"},
29+ {0x80000000, 0x00000200, "R2 (JS BUTTON 6)"},
30+ {0x80000000, 0x00000400, "L1 (JS BUTTON 7)"},
31+ {0x80000000, 0x00000800, "R1 (JS BUTTON 8)"},
32+ {0x80000000, 0x00001000, "SEL(JS BUTTON 9)"},
33+ {0x80000000, 0x00002000, "RUN(JS BUTTON 10)"},
34+ {0x80000000, 0x00004000, "L3 (JS BUTTON 11)"},
35+ {0x80000000, 0x00008000, "R3 (JS BUTTON 12)"},
36+ // 16+
37+ {0x80000000, 0x00100000, "↓ (JS AXE 2 DOWN )"},
38+ {0x80000000, 0x00200000, "↑ (JS AXE 2 UP )"},
39+ {0x80000000, 0x00400000, "→ (JS AXE 2 RIGHT)"},
40+ {0x80000000, 0x00800000, "← (JS AXE 2 LEFT )"},
41+ {0x80000000, 0x01000000, "↓ (JS AXE 3 DOWN )"},
42+ {0x80000000, 0x02000000, "↑ (JS AXE 3 UP )"},
43+ {0x80000000, 0x04000000, "→ (JS AXE 3 RIGHT)"},
44+ {0x80000000, 0x08000000, "← (JS AXE 3 LEFT )"},
45+ //{0x80000000, 0x10000000, "↓ (JS AXE 4 DOWN )"},
46+ //{0x80000000, 0x20000000, "↑ (JS AXE 4 UP )"},
47+ //{0x80000000, 0x40000000, "→ (JS AXE 4 RIGHT)"},
48+ //{0x80000000, 0x80000000, "← (JS AXE 4 LEFT )"},
49+
3650 };
3751
3852 #define KEYDEF_MAXIMUM 512
--- a/source/src/qt/gui/mainwidget_base.h
+++ b/source/src/qt/gui/mainwidget_base.h
@@ -203,6 +203,7 @@ private:
203203 class Action_Control *action_FocusWithClick;
204204 class Action_Control *action_UseRomaKana;
205205 class Action_Control *action_NumPadEnterAsFullkey;
206+ class Action_Control *action_UseJoykey;
206207 class Action_Control *action_Logging_FDC;
207208 class Action_Control *action_LogToSyslog;
208209 class Action_Control *action_LogToConsole;
@@ -212,6 +213,7 @@ private:
212213 class Action_Control *action_DevLogRecord[CSP_LOG_TYPE_VM_DEVICE_END - CSP_LOG_TYPE_VM_DEVICE_0 + 1];
213214 // Emulator
214215 class Action_Control *action_SetupJoystick;
216+ class Action_Control *action_SetupJoykey;
215217 class Action_Control *action_SetupKeyboard;
216218 class Action_Control *action_LogView;
217219 class Action_Control *action_PrintCpuStatistics;
@@ -554,6 +556,7 @@ public slots:
554556 void rise_log_viewer(void);
555557 void rise_volume_dialog(void);
556558 void rise_joystick_dialog(void);
559+ void rise_joykey_dialog(void);
557560 void rise_keyboard_dialog(void);
558561 virtual void rise_movie_dialog(void);
559562 void do_stop_saving_movie(void);
@@ -692,7 +695,7 @@ public slots:
692695 void do_set_state_log_to_record(bool f);
693696 void do_set_state_log_to_console(bool f);
694697 void do_set_state_log_to_syslog(bool f);
695-
698+ void do_set_joy_to_key(bool flag);
696699
697700 signals:
698701 int message_changed(QString);
--- a/source/src/qt/gui/menu_main.cpp
+++ b/source/src/qt/gui/menu_main.cpp
@@ -741,6 +741,7 @@ void Ui_MainWindowBase::setupUi(void)
741741 graphicsView->do_set_screen_multiply(nd);
742742 }
743743 if(using_flags->is_use_joystick()) {
744+ connect(action_SetupJoykey, SIGNAL(triggered()), this, SLOT(rise_joykey_dialog()));
744745 connect(action_SetupJoystick, SIGNAL(triggered()), this, SLOT(rise_joystick_dialog()));
745746 }
746747
@@ -782,6 +783,7 @@ void Ui_MainWindowBase::setupUi(void)
782783
783784 // Emulator
784785 #include "dropdown_joystick.h"
786+#include "dropdown_joykey.h"
785787 #include "dialog_set_key.h"
786788
787789 void Ui_MainWindowBase::retranslateEmulatorMenu(void)
@@ -789,6 +791,10 @@ void Ui_MainWindowBase::retranslateEmulatorMenu(void)
789791 if(using_flags->is_use_joystick()) {
790792 action_SetupJoystick->setText(QApplication::translate("MenuEmulator", "Configure Joysticks", 0));
791793 action_SetupJoystick->setToolTip(QApplication::translate("MenuEmulator", "Configure assigning buttons/directions of joysticks.", 0));
794+ action_SetupJoykey->setText(QApplication::translate("MenuEmulator", "Configure Joystick to KEYBOARD", 0));
795+ action_SetupJoykey->setToolTip(QApplication::translate("MenuEmulator", "Configure assigning keycode to joystick buttons.\nThis feature using Joystick #1.", 0));
796+ action_UseJoykey->setText(QApplication::translate("MenuEmulator", "Joystick to KEYBOARD", 0));
797+ action_UseJoykey->setToolTip(QApplication::translate("MenuEmulator", "Use Joystick axis/buttons to input keyboard.\nThis feature using Joystick #1.", 0));
792798 action_SetupJoystick->setIcon(QIcon(":/icon_gamepad.png"));
793799 }
794800 if(using_flags->is_use_auto_key()) {
@@ -889,6 +895,11 @@ void Ui_MainWindowBase::do_set_numpad_enter_as_fullkey(bool flag)
889895 p_config->numpad_enter_as_fullkey = flag;
890896 }
891897
898+void Ui_MainWindowBase::do_set_joy_to_key(bool flag)
899+{
900+ p_config->use_joy_to_key = flag;
901+}
902+
892903 void Ui_MainWindowBase::do_set_print_cpu_statistics(bool flag)
893904 {
894905 p_config->print_statistics = flag;
@@ -904,6 +915,9 @@ void Ui_MainWindowBase::CreateEmulatorMenu(void)
904915 if(using_flags->is_use_auto_key()) {
905916 menuEmulator->addAction(action_UseRomaKana);
906917 }
918+ if(using_flags->is_use_joystick()) {
919+ menuEmulator->addAction(action_UseJoykey);
920+ }
907921 menuEmulator->addAction(action_NumPadEnterAsFullkey);
908922 menuEmulator->addSeparator();
909923 menuEmulator->addAction(actionSpeed_FULL);
@@ -934,6 +948,7 @@ void Ui_MainWindowBase::CreateEmulatorMenu(void)
934948
935949 if(using_flags->is_use_joystick()) {
936950 menuEmulator->addAction(action_SetupJoystick);
951+ menuEmulator->addAction(action_SetupJoykey);
937952 }
938953 menuEmulator->addAction(action_SetupKeyboard);
939954 menuEmulator->addAction(action_SetupMovie);
@@ -985,7 +1000,12 @@ void Ui_MainWindowBase::ConfigEmulatorMenu(void)
9851000 connect(action_DispVirtualMedias[0], SIGNAL(triggered()), this, SLOT(do_set_visible_virtual_media_none()));
9861001 connect(action_DispVirtualMedias[1], SIGNAL(triggered()), this, SLOT(do_set_visible_virtual_media_upper()));
9871002 connect(action_DispVirtualMedias[2], SIGNAL(triggered()), this, SLOT(do_set_visible_virtual_media_lower()));
988-
1003+
1004+ if(using_flags->is_use_joystick()) {
1005+ SET_ACTION_SINGLE(action_UseJoykey, true, true, (p_config->use_joy_to_key));
1006+ connect(action_UseJoykey, SIGNAL(toggled(bool)), this, SLOT(do_set_joy_to_key(bool)));
1007+ }
1008+
9891009 if(using_flags->is_use_auto_key()) {
9901010 // ToDo: Setup if checked.
9911011 SET_ACTION_SINGLE(action_UseRomaKana, true, true, (p_config->romaji_to_kana));
@@ -1030,6 +1050,7 @@ void Ui_MainWindowBase::ConfigEmulatorMenu(void)
10301050
10311051 if(using_flags->is_use_joystick()) {
10321052 action_SetupJoystick = new Action_Control(this, using_flags);
1053+ action_SetupJoykey = new Action_Control(this, using_flags);
10331054 }
10341055 if(using_flags->is_use_sound_files_fdd()) {
10351056 /*
@@ -1196,6 +1217,16 @@ void Ui_MainWindowBase::rise_joystick_dialog(void)
11961217 }
11971218 }
11981219
1220+void Ui_MainWindowBase::rise_joykey_dialog(void)
1221+{
1222+ if(graphicsView != NULL) {
1223+ QStringList *lst = graphicsView->getVKNames();
1224+ CSP_DropDownJoykey *dlg = new CSP_DropDownJoykey(NULL, lst, using_flags);
1225+ dlg->setWindowTitle(QApplication::translate("CSP_DropDownJoysticks", "Configure Joystick to KEYBOARD", 0));
1226+ dlg->show();
1227+ }
1228+}
1229+
11991230 QString Ui_MainWindowBase::get_system_version()
12001231 {
12011232 return QString::fromUtf8("Dummy");
--- a/source/src/qt/osd.cpp
+++ b/source/src/qt/osd.cpp
@@ -734,7 +734,7 @@ void OSD::set_features_vm(void)
734734 add_feature(_T("BASE_BUBBLE_NUM"), (int)BASE_BUBBLE_NUM);
735735 #endif
736736
737-#ifndef KEY_KEEP_FRAMES
737+#ifdef KEY_KEEP_FRAMES
738738 add_feature(_T("KEY_KEEP_FRAMES"), (int)KEY_KEEP_FRAMES);
739739 #endif
740740 // End vm.h
--- a/source/src/qt/osd_base.h
+++ b/source/src/qt/osd_base.h
@@ -113,6 +113,9 @@ protected:
113113 uint8_t key_status[256]; // windows key code mapping
114114 uint8_t key_dik_prev[256];
115115 uint8_t key_converted[256];
116+ bool joy_to_key_status[256];
117+
118+ bool numpad_5_pressed;
116119 bool key_shift_pressed, key_shift_released;
117120
118121
--- a/source/src/qt/osd_input.cpp
+++ b/source/src/qt/osd_input.cpp
@@ -77,6 +77,10 @@ void OSD_BASE::initialize_input()
7777 memset(key_converted, 0, sizeof(key_converted));
7878 key_shift_pressed = key_shift_released = false;
7979 lost_focus = false;
80+ numpad_5_pressed = false;
81+ for(int i = 0; i < 256; i++) {
82+ joy_to_key_status[i] = false;
83+ }
8084 }
8185
8286 void OSD_BASE::release_input()
@@ -125,36 +129,80 @@ void OSD_BASE::update_input()
125129 }
126130 key_status[VK_LSHIFT] = key_status[VK_SHIFT] = 0;
127131 }
128-#if 0
129- if(key_status[VK_SHIFT] != 0) {
130- // shift key is newly released
131- key_status[VK_SHIFT] = 0;
132- key_status[VK_LSHIFT] = 0;
133- if(this->get_notify_key_down()) vm_key_up(VK_SHIFT);
134- // check l/r shift
135- if(!(GetAsyncKeyState(VK_LSHIFT) & 0x8000)) key_status[VK_LSHIFT] &= 0x7f;
136- if(!(GetAsyncKeyState(VK_RSHIFT) & 0x8000)) key_status[VK_RSHIFT] &= 0x7f;
132+ }
133+ key_shift_pressed = key_shift_released = false;
134+ }
135+ if(p_config->use_joy_to_key) {
136+ int status[256] = {0};
137+ if(p_config->joy_to_key_type == 0) { // Cursor
138+ static const int vk[] = {VK_UP, VK_DOWN, VK_LEFT, VK_RIGHT};
139+ for(int i = 0; i < 4; i++) {
140+ if(joy_status[0] & (1 << i)) {
141+ status[vk[i]] = 1;
142+ }
137143 }
138- if(key_status[VK_LSHIFT] != 0) {
139- // shift key is newly released
140- key_status[VK_LSHIFT] = 0;
141- if(this->get_notify_key_down()) vm_key_up(VK_LSHIFT);
142- // check l/r shift
143- if(!(GetAsyncKeyState(VK_LSHIFT) & 0x8000)) key_status[VK_LSHIFT] &= 0x7f;
144+ } else if(p_config->joy_to_key_type == 1) { // 2468
145+ static const int vk[] = {VK_NUMPAD8, VK_NUMPAD2, VK_NUMPAD4, VK_NUMPAD6};
146+ for(int i = 0; i < 4; i++) {
147+ if(joy_status[0] & (1 << i)) {
148+ status[vk[i]] = 1;
149+ }
144150 }
145- if(key_status[VK_RSHIFT] != 0) {
146- // shift key is newly released
147- key_status[VK_RSHIFT] = 0;
148- if(this->get_notify_key_down()) vm_key_up(VK_RSHIFT);
149- // check l/r shift
150- if(!(GetAsyncKeyState(VK_RSHIFT) & 0x8000)) key_status[VK_RSHIFT] &= 0x7f;
151+ } else if(p_config->joy_to_key_type == 2) { // 24681379
152+ // numpad key (8-directions)
153+ switch(joy_status[0] & 0x0f) {
154+ case 0x02 + 0x04: status[VK_NUMPAD1] = 1; break; // down-left
155+ case 0x02 : status[VK_NUMPAD2] = 1; break; // down
156+ case 0x02 + 0x08: status[VK_NUMPAD3] = 1; break; // down-right
157+ case 0x00 + 0x04: status[VK_NUMPAD4] = 1; break; // left
158+// case 0x00 : status[VK_NUMPAD5] = 1; break;
159+ case 0x00 + 0x08: status[VK_NUMPAD6] = 1; break; // right
160+ case 0x01 + 0x04: status[VK_NUMPAD7] = 1; break; // up-left
161+ case 0x01 : status[VK_NUMPAD8] = 1; break; // up
162+ case 0x01 + 0x08: status[VK_NUMPAD9] = 1; break; // up-right
151163 }
152-#endif
153164 }
154- key_shift_pressed = key_shift_released = false;
155- }
156-
157-
165+ if(p_config->joy_to_key_type == 1 || p_config->joy_to_key_type == 2) {
166+ // numpad key
167+ if(p_config->joy_to_key_numpad5 && !(joy_status[0] & 0x0f)) {
168+ if(!numpad_5_pressed) {
169+ status[VK_NUMPAD5] = 1;
170+ numpad_5_pressed = true;
171+ }
172+ }
173+ }
174+ for(int i = 0; i < 16; i++) {
175+ if(joy_status[0] & (1 << (i + 4))) {
176+ if(p_config->joy_to_key_buttons[i] < 0 && -p_config->joy_to_key_buttons[i] < 256) {
177+ status[-p_config->joy_to_key_buttons[i]] = 1;
178+ }
179+ }
180+ }
181+ for(int i = 0; i < 256; i++) {
182+ if(status[i]) {
183+ if(!joy_to_key_status[i]) {
184+ if(!(key_status[i] & 0x80)) {
185+ key_down_native(i, false);
186+ // do not keep key pressed
187+ if(p_config->joy_to_key_numpad5 && (i >= VK_NUMPAD1 && i <= VK_NUMPAD9)) {
188+ key_status[i] = KEY_KEEP_FRAMES;
189+ if(numpad_5_pressed && (i != VK_NUMPAD5)) {
190+ numpad_5_pressed = false;
191+ }
192+ }
193+ }
194+ joy_to_key_status[i] = true;
195+ }
196+ } else {
197+ if(joy_to_key_status[i]) {
198+ if(key_status[i]) {
199+ key_up_native(i);
200+ }
201+ joy_to_key_status[i] = false;
202+ }
203+ }
204+ }
205+ }
158206 // release keys
159207 if(lost_focus && !now_auto_key) {
160208 // we lost key focus so release all pressed keys
@@ -162,11 +210,9 @@ void OSD_BASE::update_input()
162210 if(key_status[i] & 0x80) {
163211 key_status[i] &= 0x7f;
164212 release_flag = true;
165- //if(this->get_notify_key_down()) {
166- if(!key_status[i]) {
167- vm_key_up(i);
168- }
169- //}
213+ if(!(key_status[i])) {
214+ vm_key_up(i);
215+ }
170216 }
171217 }
172218 } else {
@@ -174,11 +220,9 @@ void OSD_BASE::update_input()
174220 if(key_status[i] & 0x7f) {
175221 key_status[i] = (key_status[i] & 0x80) | ((key_status[i] & 0x7f) - 1);
176222 press_flag = true;
177- //if(this->get_notify_key_down()) {
178- if(!key_status[i]) {
179- vm_key_up(i);
180- }
181- //}
223+ if(!(key_status[i]) && !(joy_to_key_status[i])) {
224+ vm_key_up(i);
225+ }
182226 }
183227 }
184228 }
Binary files a/source/src/res/i18n/ja/csp_qt_gui.qm and b/source/src/res/i18n/ja/csp_qt_gui.qm differ
Show on old repository browser