message("* qt/osd")
-SET(THIS_LIB_VERSION 2.15.0)
+SET(THIS_LIB_VERSION 2.16.0)
set(s_qt_osd_headers
osd_base.h
message("* qt/gui")
-set(THIS_LIB_VERSION 2.17.0)
+set(THIS_LIB_VERSION 2.17.1)
#include(cotire)
#include(PrecompiledHeader)
dropdown_joystick.h
dropdown_jsbutton.h
dropdown_jspage.h
+
+ dropdown_joykey.h
+ dropdown_joykeybutton.h
dialog_set_key.h
dialog_set_key_combo.h
dialog_movie.h
dropdown_joystick.cpp
dropdown_jsbutton.cpp
dropdown_jspage.cpp
+
+ dropdown_joykey.cpp
+ dropdown_joykeybutton.cpp
+
dialog_set_key.cpp
dialog_set_key_combo.cpp
dialog_movie.cpp
<context>
<name>CSP_DropDownJoysticks</name>
<message>
- <location filename="menu_main.cpp" line="1194"/>
+ <location filename="menu_main.cpp" line="1215"/>
<source>Configure Joysticks</source>
<translation>ジョイステックを設定する</translation>
</message>
+ <message>
+ <location filename="menu_main.cpp" line="1225"/>
+ <source>Configure Joystick to KEYBOARD</source>
+ <translation>ジョイスティック→キーボード変換の設定</translation>
+ </message>
+</context>
+<context>
+ <name>JoykeyDialog</name>
+ <message>
+ <location filename="dropdown_joykey.cpp" line="28"/>
+ <source>Use 5 key to stop</source>
+ <oldsource><B>Use 5 key to stop</B></oldsource>
+ <translation>テンキーの「5」でカーソルを止める</translation>
+ </message>
+ <message>
+ <location filename="dropdown_joykey.cpp" line="33"/>
+ <source>Cursor keys</source>
+ <translation>カーソルキー</translation>
+ </message>
+ <message>
+ <location filename="dropdown_joykey.cpp" line="34"/>
+ <source>2468</source>
+ <translation>2468</translation>
+ </message>
+ <message>
+ <location filename="dropdown_joykey.cpp" line="35"/>
+ <source>2468 + 1379</source>
+ <translation>2468 + 1379</translation>
+ </message>
+ <message>
+ <location filename="dropdown_joykey.cpp" line="52"/>
+ <source>Joykey Type:</source>
+ <oldsource><B>Joykey Type:</B></oldsource>
+ <translation>ジョイスティック→キーボード 変換方式:</translation>
+ </message>
+ <message>
+ <location filename="dropdown_joykey.cpp" line="62"/>
+ <source>Physical Buttons:</source>
+ <oldsource><B>Physical Buttons:</B></oldsource>
+ <translation>物理ボタン:</translation>
+ </message>
</context>
<context>
<name>JoystickDialog</name>
<translation>*未定義*</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1219"/>
+ <location filename="menu_main.cpp" line="1250"/>
<source>Configure Keyboard</source>
<translation>キーボードの設定</translation>
</message>
<context>
<name>MenuEmulator</name>
<message>
- <location filename="menu_main.cpp" line="790"/>
+ <location filename="menu_main.cpp" line="792"/>
<source>Configure Joysticks</source>
<translation>ジョイスティックの設定</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="791"/>
+ <location filename="menu_main.cpp" line="793"/>
<source>Configure assigning buttons/directions of joysticks.</source>
<translation>ジョイスティックの方向やボタンの割当を設定します。</translation>
</message>
<message>
+ <location filename="menu_main.cpp" line="794"/>
+ <source>Configure Joystick to KEYBOARD</source>
+ <translation>ジョイスティック→キーボード変換の設定</translation>
+ </message>
+ <message>
<location filename="menu_main.cpp" line="795"/>
+ <source>Configure assigning keycode to joystick buttons.
+This feature using Joystick #1.</source>
+ <oldsource>Configure assigning keycode to joystick buttons.</oldsource>
+ <translation>ジョイスティックからキーボードの変換を設定します。
+ジョイスティック1番が使用されます。</translation>
+ </message>
+ <message>
+ <location filename="menu_main.cpp" line="796"/>
+ <source>Joystick to KEYBOARD</source>
+ <translation>ジョイスティックをキーボードに変換する</translation>
+ </message>
+ <message>
+ <location filename="menu_main.cpp" line="797"/>
+ <source>Use Joystick axis/buttons to input keyboard.
+This feature using Joystick #1.</source>
+ <oldsource>Use Joystick axis/buttons to input keyboard.</oldsource>
+ <translation>ジョイスティックの方向とボタンでキーボードを入力します。
+ジョイスティック1番が使用されます。</translation>
+ </message>
+ <message>
+ <location filename="menu_main.cpp" line="801"/>
<source>ROMA-KANA Conversion</source>
<translation>ローマ字かな変換</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="796"/>
+ <location filename="menu_main.cpp" line="802"/>
<source>Use romaji-kana conversion assistant of emulator.</source>
<translation>エミュレータ上のローマ字かな変換を使用します。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="798"/>
+ <location filename="menu_main.cpp" line="804"/>
<source>Emulate as FULL SPEED</source>
<translation>全速力でエミュレート</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="799"/>
+ <location filename="menu_main.cpp" line="805"/>
<source>Run emulation thread without frame sync.</source>
<translation>フレーム同期を取らずに全速力でエミュレーションします。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="801"/>
+ <location filename="menu_main.cpp" line="807"/>
<source>Numpad's Enter is Fullkey's</source>
<translation>テンキーのEnterをフルキーとみなす</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="802"/>
+ <location filename="menu_main.cpp" line="808"/>
<source>Numpad's enter key makes full key's enter.
Useful for some VMs.</source>
<translation>テンキー側のEnterキーを押した時に、フルキーのEnterを出力します。
いくつかのVMやいくつかの環境で有用なはずです。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="804"/>
+ <location filename="menu_main.cpp" line="810"/>
<source>Print Statistics</source>
<translation>統計を表示する</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="805"/>
+ <location filename="menu_main.cpp" line="811"/>
<source>Print statistics of CPUs (or some devices).
Useful for debugging.</source>
<translation>CPU使用の統計を表示します。
デバッグに有益なはずです。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="808"/>
+ <location filename="menu_main.cpp" line="814"/>
<source>FDC: Turn ON Debug log.</source>
<translation>FDCのデバッグログを開始する。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="809"/>
+ <location filename="menu_main.cpp" line="815"/>
<source>Turn ON debug logging for FDCs.Useful to resolve issues from guest software.</source>
<translation>FDCのデバッグログを取ります。
ゲストで使用するソフトウェアの問題解決に役立つかも知れません。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="812"/>
+ <location filename="menu_main.cpp" line="818"/>
<source>Emulate cursor as</source>
<translation>カーソルキーで</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="813"/>
+ <location filename="menu_main.cpp" line="819"/>
<source>Emulate cursor as ten-key.</source>
<translation>カーソルキーでテンキーをエミュレートします。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="814"/>
+ <location filename="menu_main.cpp" line="820"/>
<source>None</source>
<translation>テンキーエミュレートしない</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="815"/>
+ <location filename="menu_main.cpp" line="821"/>
<source>2 4 6 8</source>
<translation>テンキーの「2 4 6 8」をエミュレート</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="816"/>
+ <location filename="menu_main.cpp" line="822"/>
<source>1 2 3 5</source>
<translation>テンキーの「1 2 3 5 」をエミュレート</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="818"/>
+ <location filename="menu_main.cpp" line="824"/>
<source>Emulator</source>
<translation>エミュレータ</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="821"/>
+ <location filename="menu_main.cpp" line="827"/>
<source>Focus on click</source>
<translation>画面クリックでウィンドウフォーカスを固定</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="822"/>
+ <location filename="menu_main.cpp" line="828"/>
<source>If set, focus with click, not mouse-over.</source>
<translation>設定すると、マウスオーバーではなく、表示画面のクリックでフォーカスします。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="824"/>
+ <location filename="menu_main.cpp" line="830"/>
<source>Configure Keyboard</source>
<translation>キーボードの設定</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="825"/>
+ <location filename="menu_main.cpp" line="831"/>
<source>Set addignation of keyboard.</source>
<translation>キーの割当を設定します。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="827"/>
+ <location filename="menu_main.cpp" line="833"/>
<source>Configure movie encoding</source>
<translation>動画保存設定</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="828"/>
+ <location filename="menu_main.cpp" line="834"/>
<source>Configure parameters of movie encoding.</source>
<translation>動画保存での、エンコーディングのパラメータを設定します。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="830"/>
+ <location filename="menu_main.cpp" line="836"/>
<source>Log to Console</source>
<translation>コンソールに記録</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="831"/>
+ <location filename="menu_main.cpp" line="837"/>
<source>Enable logging to STDOUT if checked.</source>
<translation>チェックすると、標準出力にログが出ます。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="833"/>
+ <location filename="menu_main.cpp" line="839"/>
<source>Log to Syslog</source>
<translation>SYSLOGに記録</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="834"/>
+ <location filename="menu_main.cpp" line="840"/>
<source>Enable logging to SYSTEM log.
May be having permission to system and using *nix OS.</source>
<translation>ホストのシステムログにログを記録します。
つ*nix OSでないと使えないかもしれません。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="838"/>
+ <location filename="menu_main.cpp" line="844"/>
<source>Sound FDD Seek</source>
<translation>FDシーク音を鳴らす</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="839"/>
+ <location filename="menu_main.cpp" line="845"/>
<source>Enable FDD HEAD seeking sound.
Needs sound file.
See HELP->READMEs->Bios and Key assigns</source>
ヘルプのREADMEsの「BIOSとキー割り当て」項目をお読み下さい</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="842"/>
+ <location filename="menu_main.cpp" line="848"/>
<source>Sound CMT Relay and Buttons</source>
<translation>テープのリレーと音のボタンを鳴らす</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="843"/>
+ <location filename="menu_main.cpp" line="849"/>
<source>Enable CMT relay's sound and buttons's sounds.
Needs sound file.
See HELP->READMEs->Bios and Key assigns</source>
詳しくは、「ヘルプ」→「READMEs」→「BIOSとキー割り当て」の項目をお読みください。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="846"/>
- <location filename="menu_main.cpp" line="848"/>
+ <location filename="menu_main.cpp" line="852"/>
+ <location filename="menu_main.cpp" line="854"/>
<source>Per Device</source>
<translation>デバイスごと</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="850"/>
+ <location filename="menu_main.cpp" line="856"/>
<source>Video Platform(need restart)</source>
<translation>画面表示基盤(要再起動)</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="852"/>
+ <location filename="menu_main.cpp" line="858"/>
<source>OpenGL ES v2.0</source>
<translation></translation>
</message>
<message>
- <location filename="menu_main.cpp" line="853"/>
+ <location filename="menu_main.cpp" line="859"/>
<source>OpenGLv3.0</source>
<translation>OpenGL v3.0</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="854"/>
+ <location filename="menu_main.cpp" line="860"/>
<source>OpenGLv2.0</source>
<translation>OpenGL v2.0</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="855"/>
+ <location filename="menu_main.cpp" line="861"/>
<source>OpenGL(Core profile)</source>
<translation>OpenGL(コアプロファイル)</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="857"/>
+ <location filename="menu_main.cpp" line="863"/>
<source>Using OpenGL ES v2.0.
This is recommanded.
If changed, need to restart this emulator.</source>
変更した場合、エミュレータ自体の再起動が必要です。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="858"/>
+ <location filename="menu_main.cpp" line="864"/>
<source>Using OpenGL v3.0(MAIN).
This is recommanded.
If changed, need to restart this emulator.</source>
変更した場合は、エミュレータの再起動が必要です。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="859"/>
+ <location filename="menu_main.cpp" line="865"/>
<source>Using OpenGLv2.
This is fallback of some systems.
If changed, need to restart this emulator.</source>
変更した場合は、エミュレータの再起動が必要です。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="860"/>
+ <location filename="menu_main.cpp" line="866"/>
<source>Using OpenGL core profile.
This still not implement.
If changed, need to restart this emulator.</source>
変更した場合は、エミュレータの再起動が必要です。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="862"/>
+ <location filename="menu_main.cpp" line="868"/>
<source>Show Virtual Medias.</source>
<translatorcomment>仮想メディア一覧を表示する。</translatorcomment>
<translation>仮想メディアを表示する</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="863"/>
+ <location filename="menu_main.cpp" line="869"/>
<source>None.</source>
<translatorcomment>表示しない</translatorcomment>
<translation>表示しない</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="864"/>
+ <location filename="menu_main.cpp" line="870"/>
<source>Upper.</source>
<translatorcomment>上側</translatorcomment>
<translation>上に表示する</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="865"/>
+ <location filename="menu_main.cpp" line="871"/>
<source>Lower.</source>
<translatorcomment>下側</translatorcomment>
<translation>下に表示する</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="868"/>
+ <location filename="menu_main.cpp" line="874"/>
<source>View Log</source>
<translation>ログを見る</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="869"/>
+ <location filename="menu_main.cpp" line="875"/>
<source>View emulator logs with a dialog.</source>
<translation>エミュレータのログを、ダイアログで見ます。</translation>
</message>
<context>
<name>MenuHDD</name>
<message>
- <location filename="menu_harddisk.cpp" line="41"/>
+ <location filename="menu_harddisk.cpp" line="42"/>
<source>Mount</source>
<translation>マウントする</translation>
</message>
<message>
- <location filename="menu_harddisk.cpp" line="42"/>
+ <location filename="menu_harddisk.cpp" line="43"/>
<source>Mount virtual hard disk file.</source>
<translation>仮想ハードディスクをつないでマウントします。</translation>
</message>
<message>
- <location filename="menu_harddisk.cpp" line="44"/>
+ <location filename="menu_harddisk.cpp" line="45"/>
<source>Unmount</source>
<translation>はずす</translation>
</message>
<message>
- <location filename="menu_harddisk.cpp" line="45"/>
+ <location filename="menu_harddisk.cpp" line="46"/>
<source>Unmount virtual hard disk.</source>
<translation>仮想ハードディスクを取り外します。</translation>
</message>
<context>
<name>MenuHelp</name>
<message>
- <location filename="menu_main.cpp" line="1226"/>
+ <location filename="menu_main.cpp" line="1257"/>
<source>Help</source>
<translation>ヘルプ</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1227"/>
+ <location filename="menu_main.cpp" line="1258"/>
<source>About Qt</source>
<translation>Qtについて</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1228"/>
+ <location filename="menu_main.cpp" line="1259"/>
<source>Display Qt version.</source>
<translation>Qtのヴァージョンを表示します。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1231"/>
+ <location filename="menu_main.cpp" line="1262"/>
<source>About...</source>
<translation>このソフトについて...</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1233"/>
+ <location filename="menu_main.cpp" line="1264"/>
<source>About this emulator.</source>
<translation>このエミュレータについて。
クレジット表記などです。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1235"/>
+ <location filename="menu_main.cpp" line="1266"/>
<source>READMEs</source>
<translation>READMEs</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1237"/>
+ <location filename="menu_main.cpp" line="1268"/>
<source>General Document</source>
<translation>総合的な文書</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1238"/>
+ <location filename="menu_main.cpp" line="1269"/>
<source>About Qt ports</source>
<translation>Qt移植版について(英語)</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1239"/>
+ <location filename="menu_main.cpp" line="1270"/>
<source>About Qt ports (Japanese).</source>
<translation>Qt移植版について(日本語)。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1240"/>
+ <location filename="menu_main.cpp" line="1271"/>
<source>By Mr. Umaiboux.</source>
<translatorcomment>Umaibouxさんによる文書</translatorcomment>
<translation>Umaibouxさんによる文書</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1241"/>
+ <location filename="menu_main.cpp" line="1272"/>
<source>By Mr. tanam</source>
<translation>Tanamさんによる文書</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1242"/>
+ <location filename="menu_main.cpp" line="1273"/>
<source>About eFM-7/8/77/AV.</source>
<translation>eFM-7/8/77/AVについて。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1243"/>
+ <location filename="menu_main.cpp" line="1274"/>
<source>About eFM-7/8/77/AV (Japanese).</source>
<translation>eFM-7/8/77/AVについて(日本語)。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1244"/>
+ <location filename="menu_main.cpp" line="1275"/>
<source>FAQs(English)</source>
<translation>FAQs(英語)</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1245"/>
+ <location filename="menu_main.cpp" line="1276"/>
<source>FAQs(Japanese)</source>
<translation>FAQs(日本語)</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1246"/>
+ <location filename="menu_main.cpp" line="1277"/>
<source>BIOS and Key assigns</source>
<translation>BIOSとキー割り当てについて</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1248"/>
+ <location filename="menu_main.cpp" line="1279"/>
<source>Histories</source>
<translation>履歴・歴史</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1249"/>
+ <location filename="menu_main.cpp" line="1280"/>
<source>General History</source>
<translation>全体の歴史</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1250"/>
+ <location filename="menu_main.cpp" line="1281"/>
<source>Release Note</source>
<translation>リリースノート</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1251"/>
+ <location filename="menu_main.cpp" line="1282"/>
<source>Change Log</source>
<translation>チェンジログ</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1252"/>
+ <location filename="menu_main.cpp" line="1283"/>
<source>History by Tanam</source>
<translation>Tanamさん部分の履歴</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1254"/>
+ <location filename="menu_main.cpp" line="1285"/>
<source>Show License</source>
<translation>ライセンス</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1255"/>
+ <location filename="menu_main.cpp" line="1286"/>
<source>Show general license (GPLv2).</source>
<translation>ライセンスを読みます。GPL2です。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1256"/>
+ <location filename="menu_main.cpp" line="1287"/>
<source>Show License (Japanese)</source>
<translation>ライセンス(日本語)</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1257"/>
+ <location filename="menu_main.cpp" line="1288"/>
<source>Show general license (GPLv2).
Translated to Japanese.</source>
<translation>日本語に翻訳されたライセンスを読みます(GPL2)。</translation>
<context>
<name>MenuMachine</name>
<message>
- <location filename="menu_main.cpp" line="1268"/>
+ <location filename="menu_main.cpp" line="1299"/>
<source>Machine</source>
<translation>仮想マシン</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1270"/>
+ <location filename="menu_main.cpp" line="1301"/>
<source>Device Type</source>
<translation>デバイス</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1278"/>
+ <location filename="menu_main.cpp" line="1309"/>
<source>Sound Cards</source>
<translation>サウンドカード</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1286"/>
+ <location filename="menu_main.cpp" line="1317"/>
<source>Drive Type</source>
<translation>ドライブタイプ</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1294"/>
+ <location filename="menu_main.cpp" line="1325"/>
<source>Printer (Need RESET)</source>
<translation>プリンタ(リセットが必要)</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1296"/>
+ <location filename="menu_main.cpp" line="1327"/>
<source>Dump to File</source>
<translation>ファイルに書き込む</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1297"/>
+ <location filename="menu_main.cpp" line="1328"/>
<source>Dump printer output to file.
Maybe output only ascii text.</source>
<translation>プリンタ出力をファイルに書き込みます。
書き込まれるのは、多分、アスキーテキストだけです。</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1301"/>
+ <location filename="menu_main.cpp" line="1332"/>
<source>Printer</source>
<translation>プリンター</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1306"/>
+ <location filename="menu_main.cpp" line="1337"/>
<source>Not Connect</source>
<translation>未接続</translation>
</message>
<message>
- <location filename="menu_main.cpp" line="1307"/>
+ <location filename="menu_main.cpp" line="1338"/>
<source>None devices connect to printer port.</source>
<translation>プリンタポートに何も繋がってない状態です。</translation>
</message>
<translation>バイナリ</translation>
</message>
<message>
- <location filename="util_fd.cpp" line="125"/>
+ <location filename="util_fd.cpp" line="107"/>
<source>FDD</source>
<translation>FD</translation>
</message>
<translation type="vanished">仮想ハードディスクを取り外す</translation>
</message>
<message>
- <location filename="util_hdd.cpp" line="72"/>
+ <location filename="util_hdd.cpp" line="58"/>
<source>HDD</source>
<translation>HD</translation>
</message>
--- /dev/null
+/*
+ * Common Source Project/ Qt
+ * (C) 2015 K.Ohta <whatisthis.sowhat _at_ gmail.com>
+ * Qt: Menu->Emulator->Define Strings
+ * History: Feb 23, 2016 : Initial
+ */
+
+//#include "osd.h"
+#include <QApplication>
+#include <QRadioButton>
+#include <QCheckBox>
+#include <QLabel>
+#include "config.h"
+
+#include "dropdown_keyset.h"
+#include "dropdown_joykey.h"
+#include "dropdown_joykeybutton.h"
+
+CSP_DropDownJoykey::CSP_DropDownJoykey(QWidget *parent, QStringList *lst, USING_FLAGS *p) : QWidget(parent)
+{
+ p_wid = parent;
+ using_flags = p;
+ p_config = p->get_config_ptr();
+
+ layout = new QGridLayout(this);
+ int i;
+
+ QCheckBox *numpad5 = new QCheckBox(QApplication::translate("JoykeyDialog", "Use 5 key to stop", 0), this);
+ connect(numpad5, SIGNAL(toggled(bool)), this, SLOT(do_set_check_numpad5(bool)));
+ layout->addWidget(numpad5, 0, 0, Qt::AlignLeft);
+ numpad5->setChecked(p_config->joy_to_key_numpad5);
+
+ 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);
+
+ switch(p_config->joy_to_key_type) {
+ case 0:
+ joykey_type_cursor->setChecked(true);
+ break;
+ case 1:
+ joykey_type_2468->setChecked(true);
+ break;
+ case 2:
+ joykey_type_1379->setChecked(true);
+ break;
+ default:
+ joykey_type_cursor->setChecked(true);
+ p_config->joy_to_key_type = 0;
+ break;
+ }
+ 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);
+
+ 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()));
+
+ QLabel *label_buttons = new QLabel(QApplication::translate("JoykeyDialog", "Physical Buttons:", 0), this);
+ layout->addWidget(label_buttons, 5, 0, Qt::AlignLeft);
+
+ _TCHAR tmps[32];
+ QString nm;
+ for(i = 0; i < 12; i++) {
+ memset(tmps, 0x00, sizeof(char) * 20);
+ label_button[i] = new QLabel(this);
+ js_button[i] = new CSP_DropDownJoykeyButton(p, this, lst, i);
+ 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);
+ }
+
+
+ if(p_wid == NULL) this->setWindowIcon(QIcon(":/icon_gamepad.png"));
+ this->setLayout(layout);
+ this->show();
+}
+
+CSP_DropDownJoykey::~CSP_DropDownJoykey()
+{
+}
+
+void CSP_DropDownJoykey::do_set_check_numpad5(bool n)
+{
+ p_config->joy_to_key_numpad5 = n;
+}
+
+void CSP_DropDownJoykey::do_set_type_cursor()
+{
+ p_config->joy_to_key_type = 0;
+}
+
+void CSP_DropDownJoykey::do_set_type_2468()
+{
+ p_config->joy_to_key_type = 1;
+}
+
+void CSP_DropDownJoykey::do_set_type_1379()
+{
+ p_config->joy_to_key_type = 2;
+}
+
--- /dev/null
+/*
+ * Common Source Project/ Qt
+ * (C) 2015 K.Ohta <whatisthis.sowhat _at_ gmail.com>
+ * Qt: Menu->Emulator->Define Strings
+ * History: Feb 23, 2016 : Initial
+ */
+
+#ifndef _CSP_DROPDOWN_JOYKEY_H
+#define _CSP_DROPDOWN_JOYKEY_H
+
+#include <QWidget>
+#include <QStringList>
+#include <QString>
+#include <QGridLayout>
+#include "config.h"
+#include "common.h"
+#include "menu_flags.h"
+
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+class CSP_DropDownJoykeyButton;
+
+class DLL_PREFIX CSP_DropDownJoykey: public QWidget {
+ Q_OBJECT
+protected:
+ config_t *p_config;
+ QWidget *p_wid;
+ QWidget *window;
+ QGridLayout *layout;
+ USING_FLAGS *using_flags;
+
+ QLabel *label_button[12];
+ CSP_DropDownJoykeyButton *js_button[12];
+public:
+ CSP_DropDownJoykey(QWidget *parent, QStringList *lst, USING_FLAGS *p);
+ ~CSP_DropDownJoykey();
+
+public slots:
+ void do_set_check_numpad5(bool n);
+ void do_set_type_cursor();
+ void do_set_type_2468();
+ void do_set_type_1379();
+
+signals:
+
+};
+
+QT_END_NAMESPACE
+#endif //#ifndef _CSP_DROPDOWN_JOYKEY_H
--- /dev/null
+/*
+ * Common Source Project/ Qt
+ * (C) 2015 K.Ohta <whatisthis.sowhat _at_ gmail.com>
+ * Qt: Menu->Emulator->Define Strings
+ * History: Feb 23, 2016 : Initial
+ */
+
+#include <QVariant>
+#include <QApplication>
+#include "dropdown_keytables.h"
+#include "dropdown_joykeybutton.h"
+#include "menu_flags.h"
+
+CSP_DropDownJoykeyButton::CSP_DropDownJoykeyButton(USING_FLAGS *p, QWidget *parent, QStringList *lst, int button_num) : QWidget(parent)
+{
+ p_wid = parent;
+ using_flags = p;
+ p_config = p->get_config_ptr();
+
+ bind_button = button_num;
+ layout = new QHBoxLayout(this);
+ combo = new QComboBox(this);
+
+ for(int i = 0; i < 256; i++) {
+ if(default_key_table_106_QtScan[i].vk == 0xffffffff) break;
+ combo->addItem(QString::fromUtf8(default_key_table_106_QtScan[i].name), QVariant((int)default_key_table_106_QtScan[i].vk));
+ }
+ connect(combo, SIGNAL(activated(int)), this, SLOT(do_select(int)));
+ if((button_num < 16) && (button_num >= 0)) {
+ for(int i = 0; i < combo->count(); i++) {
+ if(p_config->joy_to_key_buttons[button_num] == default_key_table_106_QtScan[i].vk) {
+ combo->setCurrentIndex(i);
+ break;
+ }
+ }
+ }
+ layout->addWidget(combo);
+ this->setLayout(layout);
+}
+
+CSP_DropDownJoykeyButton::~CSP_DropDownJoykeyButton()
+{
+}
+
+void CSP_DropDownJoykeyButton::do_select(int idx)
+{
+ int vk = default_key_table_106_QtScan[idx].vk;
+ p_config->joy_to_key_buttons[bind_button] = -vk;
+}
+
--- /dev/null
+/*
+ * Common Source Project/ Qt
+ * (C) 2015 K.Ohta <whatisthis.sowhat _at_ gmail.com>
+ * Qt: Menu->Emulator->Define Strings
+ * History: 18 Dec, 2018 : Initial
+ */
+
+#ifndef _CSP_QT_DROPDOWN_JOYKEY_BUTTON_H
+#define _CSP_QT_DROPDOWN_JOYKEY_BUTTON_H
+
+#include "config.h"
+#include <QString>
+#include <QStringList>
+#include <QComboBox>
+#include <QWidget>
+#include <QHBoxLayout>
+
+#include "dropdown_keytables.h"
+
+class USING_FLAGS;
+
+class DLL_PREFIX CSP_DropDownJoykeyButton: public QWidget {
+ Q_OBJECT;
+protected:
+ QWidget *p_wid;
+ config_t *p_config;
+ QHBoxLayout *layout;
+ QComboBox *combo;
+
+ int bind_button;
+ USING_FLAGS *using_flags;
+public:
+ CSP_DropDownJoykeyButton(USING_FLAGS *p, QWidget *parent = 0, QStringList *lst = 0, int button_num = 0);
+ ~CSP_DropDownJoykeyButton();
+public slots:
+ void do_select(int index);
+signals:
+
+};
+
+#endif //_CSP_QT_DROPDOWN_JOYKEY_BUTTON_H
layout = new QHBoxLayout(this);
combo = new QComboBox(this);
int i;
- for(i = 0; i < 16; i++) {
+ for(i = 0; i < (sizeof(joystick_define_tbl) / sizeof(keydef_table_t)) ; i++) {
combo->addItem(QString::fromUtf8(joystick_define_tbl[i].name));
}
if(lst != NULL) combo->addItems(*lst);
}
}
this->setLayout(layout);
- connect(this, SIGNAL(sig_select_js_button(int, int, int)), parent, SLOT(do_set_js_button(int, int, int)));
- connect(this, SIGNAL(sig_select_js_button_idx(int, int, int)), parent, SLOT(do_set_js_button_idx(int, int, int)));
+ connect(this, SIGNAL(sig_set_js_button(int, int, int)), parent, SLOT(do_set_js_button(int, int, int)));
+ connect(this, SIGNAL(sig_set_js_button_idx(int, int, int)), parent, SLOT(do_set_js_button_idx(int, int, int)));
}
CSP_DropDownJSPage::~CSP_DropDownJSPage()
}
-void CSP_DropDownJSPage::do_select_up(int index)
+void CSP_DropDownJSPage::do_select_common(int index, int axes)
{
if(index < 16) {
- emit sig_select_js_button(bind_jsnum, 0, joystick_define_tbl[index].scan);
+ emit sig_set_js_button(bind_jsnum, axes, joystick_define_tbl[index].scan);
+ } else if(index < 20) {
+ emit sig_set_js_button(bind_jsnum, axes, ((joystick_define_tbl[index - 16].scan) >> 20) | ((index - 16 + 1) << 5));
+ } else if(index < 24) {
+ emit sig_set_js_button(bind_jsnum, axes, ((joystick_define_tbl[index - 16].scan) >> 24) | ((index - 16 + 1) << 5));
+ } else {
+ emit sig_set_js_button_idx(bind_jsnum, axes, -(index - 24));
}
- emit sig_select_js_button_idx(bind_jsnum, 0, -(index - 16));
+}
+void CSP_DropDownJSPage::do_select_up(int index)
+{
+ do_select_common(index, 0);
}
void CSP_DropDownJSPage::do_select_down(int index)
{
- if(index < 16) {
- emit sig_select_js_button(bind_jsnum, 1, joystick_define_tbl[index].scan);
- }
- emit sig_select_js_button_idx(bind_jsnum, 1, -(index - 16));
+ do_select_common(index, 1);
}
void CSP_DropDownJSPage::do_select_left(int index)
{
- if(index < 16) {
- emit sig_select_js_button(bind_jsnum, 2, joystick_define_tbl[index].scan);
- }
- emit sig_select_js_button_idx(bind_jsnum, 2, -(index - 16));
+ do_select_common(index, 2);
}
void CSP_DropDownJSPage::do_select_right(int index)
{
- if(index < 16) {
- emit sig_select_js_button(bind_jsnum, 3, joystick_define_tbl[index].scan);
- }
- emit sig_select_js_button_idx(bind_jsnum, 3, -(index - 16));
+ do_select_common(index, 3);
}
void CSP_DropDownJSPage::do_select_js_button(int jsnum, int button, int scan)
{
//printf("Select: %d %d %d\n", jsnum, button, scan);
- emit sig_select_js_button(jsnum, button, scan);
+ emit sig_set_js_button(jsnum, button, scan);
}
void CSP_DropDownJSPage::do_select_js_button_idx(int jsnum, int button, int scan)
{
- emit sig_select_js_button_idx(jsnum, button, scan);
+ emit sig_set_js_button_idx(jsnum, button, scan);
//printf("Select_Idx: %d %d %d\n", jsnum, button, scan);
}
QLabel *label_button[12];
int bind_jsnum;
USING_FLAGS *using_flags;
+ void do_select_common(int index, int axes);
public:
CSP_DropDownJSPage(USING_FLAGS *pp, QWidget *parent = 0, QStringList *lst = 0, int jsnum = 0);
~CSP_DropDownJSPage();
void do_select_js_button(int jsnum, int button_num, int assigned_value);
void do_select_js_button_idx(int jsnum, int button_num, int assigned_value);
signals:
- int sig_select_js_button(int jsnum, int button_num, int assigned_value);
- int sig_select_js_button_idx(int jsnum, int button_num, int assigned_value);
+ int sig_set_js_button(int jsnum, int button_num, int assigned_value);
+ int sig_set_js_button_idx(int jsnum, int button_num, int assigned_value);
};
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
const keydef_table_t joystick_define_tbl[] = {
- {0x80000000, 0x00000001, "↓ (Joystick)"},
- {0x80000000, 0x00000002, "↑ (Joystick)"},
- {0x80000000, 0x00000004, "→ (Joystick)"},
- {0x80000000, 0x00000008, "← (Joystick)"},
- {0x80000000, 0x00000010, "△ (Joystick)"},
- {0x80000000, 0x00000020, "○ (Joystick)"},
- {0x80000000, 0x00000040, "× (Joystick)"},
- {0x80000000, 0x00000080, "□ (Joystick)"},
- {0x80000000, 0x00000100, "L2 (Joystick)"},
- {0x80000000, 0x00000200, "R2 (Joystick)"},
- {0x80000000, 0x00000400, "L1 (Joystick)"},
- {0x80000000, 0x00000800, "R1 (Joystick)"},
- {0x80000000, 0x00001000, "SEL(Joystick)"},
- {0x80000000, 0x00002000, "RUN(Joystick)"},
- {0x80000000, 0x00004000, "L3 (Joystick)"},
- {0x80000000, 0x00008000, "R3 (Joystick)"},
+ {0x80000000, 0x00000001, "↓ (JS DOWN )"},
+ {0x80000000, 0x00000002, "↑ (JS UP )"},
+ {0x80000000, 0x00000004, "→ (JS RIGHT)"},
+ {0x80000000, 0x00000008, "← (JS LEFT )"},
+ {0x80000000, 0x00000010, "△ (JS BUTTON 1)"},
+ {0x80000000, 0x00000020, "○ (JS BUTTON 2)"},
+ {0x80000000, 0x00000040, "× (JS BUTTON 3)"},
+ {0x80000000, 0x00000080, "□ (JS BUTTON 4)"},
+ {0x80000000, 0x00000100, "L2 (JS BUTTON 5)"},
+ {0x80000000, 0x00000200, "R2 (JS BUTTON 6)"},
+ {0x80000000, 0x00000400, "L1 (JS BUTTON 7)"},
+ {0x80000000, 0x00000800, "R1 (JS BUTTON 8)"},
+ {0x80000000, 0x00001000, "SEL(JS BUTTON 9)"},
+ {0x80000000, 0x00002000, "RUN(JS BUTTON 10)"},
+ {0x80000000, 0x00004000, "L3 (JS BUTTON 11)"},
+ {0x80000000, 0x00008000, "R3 (JS BUTTON 12)"},
+ // 16+
+ {0x80000000, 0x00100000, "↓ (JS AXE 2 DOWN )"},
+ {0x80000000, 0x00200000, "↑ (JS AXE 2 UP )"},
+ {0x80000000, 0x00400000, "→ (JS AXE 2 RIGHT)"},
+ {0x80000000, 0x00800000, "← (JS AXE 2 LEFT )"},
+ {0x80000000, 0x01000000, "↓ (JS AXE 3 DOWN )"},
+ {0x80000000, 0x02000000, "↑ (JS AXE 3 UP )"},
+ {0x80000000, 0x04000000, "→ (JS AXE 3 RIGHT)"},
+ {0x80000000, 0x08000000, "← (JS AXE 3 LEFT )"},
+ //{0x80000000, 0x10000000, "↓ (JS AXE 4 DOWN )"},
+ //{0x80000000, 0x20000000, "↑ (JS AXE 4 UP )"},
+ //{0x80000000, 0x40000000, "→ (JS AXE 4 RIGHT)"},
+ //{0x80000000, 0x80000000, "← (JS AXE 4 LEFT )"},
+
};
#define KEYDEF_MAXIMUM 512
class Action_Control *action_FocusWithClick;
class Action_Control *action_UseRomaKana;
class Action_Control *action_NumPadEnterAsFullkey;
+ class Action_Control *action_UseJoykey;
class Action_Control *action_Logging_FDC;
class Action_Control *action_LogToSyslog;
class Action_Control *action_LogToConsole;
class Action_Control *action_DevLogRecord[CSP_LOG_TYPE_VM_DEVICE_END - CSP_LOG_TYPE_VM_DEVICE_0 + 1];
// Emulator
class Action_Control *action_SetupJoystick;
+ class Action_Control *action_SetupJoykey;
class Action_Control *action_SetupKeyboard;
class Action_Control *action_LogView;
class Action_Control *action_PrintCpuStatistics;
void rise_log_viewer(void);
void rise_volume_dialog(void);
void rise_joystick_dialog(void);
+ void rise_joykey_dialog(void);
void rise_keyboard_dialog(void);
virtual void rise_movie_dialog(void);
void do_stop_saving_movie(void);
void do_set_state_log_to_record(bool f);
void do_set_state_log_to_console(bool f);
void do_set_state_log_to_syslog(bool f);
-
+ void do_set_joy_to_key(bool flag);
signals:
int message_changed(QString);
graphicsView->do_set_screen_multiply(nd);
}
if(using_flags->is_use_joystick()) {
+ connect(action_SetupJoykey, SIGNAL(triggered()), this, SLOT(rise_joykey_dialog()));
connect(action_SetupJoystick, SIGNAL(triggered()), this, SLOT(rise_joystick_dialog()));
}
// Emulator
#include "dropdown_joystick.h"
+#include "dropdown_joykey.h"
#include "dialog_set_key.h"
void Ui_MainWindowBase::retranslateEmulatorMenu(void)
if(using_flags->is_use_joystick()) {
action_SetupJoystick->setText(QApplication::translate("MenuEmulator", "Configure Joysticks", 0));
action_SetupJoystick->setToolTip(QApplication::translate("MenuEmulator", "Configure assigning buttons/directions of joysticks.", 0));
+ action_SetupJoykey->setText(QApplication::translate("MenuEmulator", "Configure Joystick to KEYBOARD", 0));
+ action_SetupJoykey->setToolTip(QApplication::translate("MenuEmulator", "Configure assigning keycode to joystick buttons.\nThis feature using Joystick #1.", 0));
+ action_UseJoykey->setText(QApplication::translate("MenuEmulator", "Joystick to KEYBOARD", 0));
+ action_UseJoykey->setToolTip(QApplication::translate("MenuEmulator", "Use Joystick axis/buttons to input keyboard.\nThis feature using Joystick #1.", 0));
action_SetupJoystick->setIcon(QIcon(":/icon_gamepad.png"));
}
if(using_flags->is_use_auto_key()) {
p_config->numpad_enter_as_fullkey = flag;
}
+void Ui_MainWindowBase::do_set_joy_to_key(bool flag)
+{
+ p_config->use_joy_to_key = flag;
+}
+
void Ui_MainWindowBase::do_set_print_cpu_statistics(bool flag)
{
p_config->print_statistics = flag;
if(using_flags->is_use_auto_key()) {
menuEmulator->addAction(action_UseRomaKana);
}
+ if(using_flags->is_use_joystick()) {
+ menuEmulator->addAction(action_UseJoykey);
+ }
menuEmulator->addAction(action_NumPadEnterAsFullkey);
menuEmulator->addSeparator();
menuEmulator->addAction(actionSpeed_FULL);
if(using_flags->is_use_joystick()) {
menuEmulator->addAction(action_SetupJoystick);
+ menuEmulator->addAction(action_SetupJoykey);
}
menuEmulator->addAction(action_SetupKeyboard);
menuEmulator->addAction(action_SetupMovie);
connect(action_DispVirtualMedias[0], SIGNAL(triggered()), this, SLOT(do_set_visible_virtual_media_none()));
connect(action_DispVirtualMedias[1], SIGNAL(triggered()), this, SLOT(do_set_visible_virtual_media_upper()));
connect(action_DispVirtualMedias[2], SIGNAL(triggered()), this, SLOT(do_set_visible_virtual_media_lower()));
-
+
+ if(using_flags->is_use_joystick()) {
+ SET_ACTION_SINGLE(action_UseJoykey, true, true, (p_config->use_joy_to_key));
+ connect(action_UseJoykey, SIGNAL(toggled(bool)), this, SLOT(do_set_joy_to_key(bool)));
+ }
+
if(using_flags->is_use_auto_key()) {
// ToDo: Setup if checked.
SET_ACTION_SINGLE(action_UseRomaKana, true, true, (p_config->romaji_to_kana));
if(using_flags->is_use_joystick()) {
action_SetupJoystick = new Action_Control(this, using_flags);
+ action_SetupJoykey = new Action_Control(this, using_flags);
}
if(using_flags->is_use_sound_files_fdd()) {
/*
}
}
+void Ui_MainWindowBase::rise_joykey_dialog(void)
+{
+ if(graphicsView != NULL) {
+ QStringList *lst = graphicsView->getVKNames();
+ CSP_DropDownJoykey *dlg = new CSP_DropDownJoykey(NULL, lst, using_flags);
+ dlg->setWindowTitle(QApplication::translate("CSP_DropDownJoysticks", "Configure Joystick to KEYBOARD", 0));
+ dlg->show();
+ }
+}
+
QString Ui_MainWindowBase::get_system_version()
{
return QString::fromUtf8("Dummy");
add_feature(_T("BASE_BUBBLE_NUM"), (int)BASE_BUBBLE_NUM);
#endif
-#ifndef KEY_KEEP_FRAMES
+#ifdef KEY_KEEP_FRAMES
add_feature(_T("KEY_KEEP_FRAMES"), (int)KEY_KEEP_FRAMES);
#endif
// End vm.h
uint8_t key_status[256]; // windows key code mapping
uint8_t key_dik_prev[256];
uint8_t key_converted[256];
+ bool joy_to_key_status[256];
+
+ bool numpad_5_pressed;
bool key_shift_pressed, key_shift_released;
memset(key_converted, 0, sizeof(key_converted));
key_shift_pressed = key_shift_released = false;
lost_focus = false;
+ numpad_5_pressed = false;
+ for(int i = 0; i < 256; i++) {
+ joy_to_key_status[i] = false;
+ }
}
void OSD_BASE::release_input()
}
key_status[VK_LSHIFT] = key_status[VK_SHIFT] = 0;
}
-#if 0
- if(key_status[VK_SHIFT] != 0) {
- // shift key is newly released
- key_status[VK_SHIFT] = 0;
- key_status[VK_LSHIFT] = 0;
- if(this->get_notify_key_down()) vm_key_up(VK_SHIFT);
- // check l/r shift
- if(!(GetAsyncKeyState(VK_LSHIFT) & 0x8000)) key_status[VK_LSHIFT] &= 0x7f;
- if(!(GetAsyncKeyState(VK_RSHIFT) & 0x8000)) key_status[VK_RSHIFT] &= 0x7f;
+ }
+ key_shift_pressed = key_shift_released = false;
+ }
+ if(p_config->use_joy_to_key) {
+ int status[256] = {0};
+ if(p_config->joy_to_key_type == 0) { // Cursor
+ static const int vk[] = {VK_UP, VK_DOWN, VK_LEFT, VK_RIGHT};
+ for(int i = 0; i < 4; i++) {
+ if(joy_status[0] & (1 << i)) {
+ status[vk[i]] = 1;
+ }
}
- if(key_status[VK_LSHIFT] != 0) {
- // shift key is newly released
- key_status[VK_LSHIFT] = 0;
- if(this->get_notify_key_down()) vm_key_up(VK_LSHIFT);
- // check l/r shift
- if(!(GetAsyncKeyState(VK_LSHIFT) & 0x8000)) key_status[VK_LSHIFT] &= 0x7f;
+ } else if(p_config->joy_to_key_type == 1) { // 2468
+ static const int vk[] = {VK_NUMPAD8, VK_NUMPAD2, VK_NUMPAD4, VK_NUMPAD6};
+ for(int i = 0; i < 4; i++) {
+ if(joy_status[0] & (1 << i)) {
+ status[vk[i]] = 1;
+ }
}
- if(key_status[VK_RSHIFT] != 0) {
- // shift key is newly released
- key_status[VK_RSHIFT] = 0;
- if(this->get_notify_key_down()) vm_key_up(VK_RSHIFT);
- // check l/r shift
- if(!(GetAsyncKeyState(VK_RSHIFT) & 0x8000)) key_status[VK_RSHIFT] &= 0x7f;
+ } else if(p_config->joy_to_key_type == 2) { // 24681379
+ // numpad key (8-directions)
+ switch(joy_status[0] & 0x0f) {
+ case 0x02 + 0x04: status[VK_NUMPAD1] = 1; break; // down-left
+ case 0x02 : status[VK_NUMPAD2] = 1; break; // down
+ case 0x02 + 0x08: status[VK_NUMPAD3] = 1; break; // down-right
+ case 0x00 + 0x04: status[VK_NUMPAD4] = 1; break; // left
+// case 0x00 : status[VK_NUMPAD5] = 1; break;
+ case 0x00 + 0x08: status[VK_NUMPAD6] = 1; break; // right
+ case 0x01 + 0x04: status[VK_NUMPAD7] = 1; break; // up-left
+ case 0x01 : status[VK_NUMPAD8] = 1; break; // up
+ case 0x01 + 0x08: status[VK_NUMPAD9] = 1; break; // up-right
}
-#endif
}
- key_shift_pressed = key_shift_released = false;
- }
-
-
+ if(p_config->joy_to_key_type == 1 || p_config->joy_to_key_type == 2) {
+ // numpad key
+ if(p_config->joy_to_key_numpad5 && !(joy_status[0] & 0x0f)) {
+ if(!numpad_5_pressed) {
+ status[VK_NUMPAD5] = 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) {
+ status[-p_config->joy_to_key_buttons[i]] = 1;
+ }
+ }
+ }
+ for(int i = 0; i < 256; i++) {
+ if(status[i]) {
+ if(!joy_to_key_status[i]) {
+ if(!(key_status[i] & 0x80)) {
+ key_down_native(i, false);
+ // 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;
+ }
+ }
+ }
+ joy_to_key_status[i] = true;
+ }
+ } else {
+ if(joy_to_key_status[i]) {
+ if(key_status[i]) {
+ key_up_native(i);
+ }
+ joy_to_key_status[i] = false;
+ }
+ }
+ }
+ }
// release keys
if(lost_focus && !now_auto_key) {
// we lost key focus so release all pressed keys
if(key_status[i] & 0x80) {
key_status[i] &= 0x7f;
release_flag = true;
- //if(this->get_notify_key_down()) {
- if(!key_status[i]) {
- vm_key_up(i);
- }
- //}
+ if(!(key_status[i])) {
+ vm_key_up(i);
+ }
}
}
} else {
if(key_status[i] & 0x7f) {
key_status[i] = (key_status[i] & 0x80) | ((key_status[i] & 0x7f) - 1);
press_flag = true;
- //if(this->get_notify_key_down()) {
- if(!key_status[i]) {
- vm_key_up(i);
- }
- //}
+ if(!(key_status[i]) && !(joy_to_key_status[i])) {
+ vm_key_up(i);
+ }
}
}
}