Compare commits

...

5 Commits

Author SHA1 Message Date
chaoticgd 3a125a2d7a Debugger: Replace calls to QDialog::exec with QDialog::open 2026-02-03 20:07:32 -05:00
chaoticgd 8415a4b0d6 Debugger: Replace QMessageBox with AsyncMessageBox 2026-02-03 20:07:32 -05:00
chaoticgd 209e676e3a Debugger: Replace QInputDialog with AsyncInputDialog 2026-02-03 20:07:32 -05:00
chaoticgd a64431c7b5 Qt: Add asynchronous dialog box helper functions 2026-02-03 20:07:32 -05:00
PCSX2 Bot 665eb3d6b3 [ci skip] PAD: Update to latest controller database. 2026-02-02 12:18:00 -05:00
19 changed files with 855 additions and 287 deletions
+20 -18
View File
@@ -236,7 +236,7 @@
03000000ac0500005b05000000000000,GameSir G3w,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000ac0500002d02000000000000,GameSir G4,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows,
03000000ac0500004d04000000000000,GameSir G4,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000373500002210000000000000,GameSir G7 Pro,a:b0,b:b1,x:b3,y:b4,back:b10,start:b11,leftstick:b13,rightstick:b14,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,lefty:a2,rightx:a3,righty:a4,lefttrigger:b8,righttrigger:b9,platform:Window,
03000000373500002210000000000000,GameSir G7 Pro,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000ac0500001a06000000000000,GameSir T3 2.02,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000373500009410000000000000,GameSir Tegenaria Lite,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
030000004c0e00001035000000000000,Gamester,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows,
@@ -246,8 +246,6 @@
03000000b62500000100000000000000,Gametel GT004 01,a:b3,b:b0,dpdown:b10,dpleft:b9,dpright:b8,dpup:b11,leftshoulder:b4,rightshoulder:b5,start:b7,x:b1,y:b2,platform:Windows,
030000008f0e00001411000000000000,Gamo2 Divaller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000120c0000a857000000000000,Gator Claw,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000c21100000791000000000000,Nacon GC101 1.03,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000c9110000f055000000000000,Nacon GC100XF,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
030000008305000009a0000000000000,Genius,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
030000008305000031b0000000000000,Genius Maxfire Blaze 3,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
03000000451300000010000000000000,Genius Maxfire Grandias 12,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
@@ -367,7 +365,7 @@
03000000fd0500002a26000000000000,InterAct Hammerhead FX,a:b3,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b0,y:b1,platform:Windows,
03000000fd0500002f26000000000000,InterAct Hammerhead FX,a:b4,b:b5,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b1,y:b2,platform:Windows,
03000000fd0500005302000000000000,InterAct ProPad,a:b3,b:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,x:b0,y:b1,platform:Windows,
03000000ac0500002c02000000000000,Ipega Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,leftstick:b13,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b9,rightstick:b14,righttrigger:b7,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000ac0500002c02000000000000,Ipega Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b8,leftstick:b13,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b9,rightstick:b14,righttrigger:b7,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000491900000204000000000000,Ipega PG9023,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000491900000304000000000000,Ipega PG9087,+righty:+a5,-righty:-a4,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,start:b11,x:b3,y:b4,platform:Windows,
030000007e0500000620000000000000,Joy-Con (L),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b13,leftshoulder:b4,leftstick:b10,rightshoulder:b5,start:b8,x:b2,y:b3,platform:Windows,
@@ -464,6 +462,8 @@
03000000250900006688000000000000,MP-8866 Super Dual Box,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,
03000000091200004488000000000000,MUSIA PlayStation 2 Input Display,a:b0,b:b2,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,leftstick:b6,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b9,rightstick:b7,righttrigger:b11,rightx:a2,righty:a3,start:b5,x:b1,y:b3,platform:Windows,
03000000f70600000100000000000000,N64 Adaptoid,+rightx:b2,+righty:b1,-rightx:b4,-righty:b5,a:b0,b:b3,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b7,start:b8,platform:Windows,
03000000c9110000f055000000000000,Nacon GC100XF,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
03000000c21100000791000000000000,Nacon GC101 1.03,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
030000006b140000010c000000000000,Nacon GC400ES,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
030000006b1400001106000000000000,Nacon Revolution 3 PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
0300000085320000170d000000000000,Nacon Revolution 5 Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
@@ -697,7 +697,7 @@
03000000730700000601000000000000,Sega Saturn Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b9,x:b3,y:b4,platform:Windows,
03000000b40400000a01000000000000,Sega Saturn Controller,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b5,righttrigger:b2,start:b8,x:b3,y:b4,platform:Windows,
030000003b07000004a1000000000000,SFX,a:b0,b:b2,back:b7,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b9,righttrigger:b5,start:b8,x:b1,y:b3,platform:Windows,
03000000632500002705000000000000,ShanWan Q36,a:b0,b:b1,x:b3,y:b4,leftshoulder:b6,rightshoulder:b7,lefttrigger:b8,righttrigger:b9,back:b10,start:b11,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,platform:Windows,
03000000632500002705000000000000,ShanWan Q36,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,rightshoulder:b7,righttrigger:b9,start:b11,x:b3,y:b4,platform:Windows,
03000000f82100001900000000000000,Shogun Bros Chameleon X1,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,
03000000120c00001c1e000000000000,SnakeByte 4S PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
03000000140300000918000000000000,SNES Controller,a:b0,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Windows,
@@ -888,6 +888,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
03000000c82d00000851000000010000,8BitDo P30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
03000000c82d00000660000000010000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00000660000000020000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00000960000000000000,8BitDo Pro 3,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,paddle1:b17,paddle2:b16,paddle3:b2,paddle4:b5,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00000131000001000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00000231000001000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00000331000001000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
@@ -1174,7 +1175,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
03000000c82d00000090000011010000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
05000000c82d00001038000000010000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
05000000c82d00006a28000000010000,8BitDo GameCube,a:b0,b:b3,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,paddle1:b9,paddle2:b8,rightshoulder:b10,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b1,y:b4,platform:Linux,
03000000c82d00001251000011010000,8BitDo Lite 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
03000000c82d00001251000011010000,8BitDo Lite 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
05000000c82d00001251000000010000,8BitDo Lite 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
03000000c82d00001151000011010000,8BitDo Lite SE,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
05000000c82d00001151000000010000,8BitDo Lite SE,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
@@ -1397,11 +1398,12 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
03000000242e00006a38000010010000,Hyperkin Trooper 2,a:b0,b:b1,back:b4,leftshoulder:b2,leftx:a0,lefty:a1,rightshoulder:b3,start:b5,platform:Linux,
03000000242e00008816000001010000,Hyperkin X91,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000f00300008d03000011010000,HyperX Clutch,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
05000000f00300008d04000000010000,HyperX Clutch,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
03000000830500006020000010010000,iBuffalo Super Famicom Controller,a:b1,b:b0,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b2,platform:Linux,
03000000d80400004bea000011010000,icedragon.io STAC Dance Pad,a:b0,b:b1,x:b2,y:b3,back:b4,platform:Linux,
03000000d80400004aea000011010000,icedragon.io STAC Dance Pad,a:b0,b:b1,x:b2,y:b3,back:b4,platform:Linux,
030000008a2e0000d910000011010000,icedragon.io STAC2 Dance Pad,a:b0,b:b1,x:b2,y:b3,back:b4,platform:Linux,
030000008a2e0000e910000011010000,icedragon.io STAC2 Dance Pad,a:b8,b:b9,x:b10,y:b11,back:b12,platform:Linux,
03000000d80400004aea000011010000,icedragon.io STAC Dance Pad,a:b0,b:b1,back:b4,x:b2,y:b3,platform:Linux,
03000000d80400004bea000011010000,icedragon.io STAC Dance Pad,a:b0,b:b1,back:b4,x:b2,y:b3,platform:Linux,
030000008a2e0000d910000011010000,icedragon.io STAC2 Dance Pad,a:b0,b:b1,back:b4,x:b2,y:b3,platform:Linux,
030000008a2e0000e910000011010000,icedragon.io STAC2 Dance Pad,a:b8,b:b9,back:b12,x:b10,y:b11,platform:Linux,
030000008f0e00001330000001010000,iCode Retro Adapter,b:b3,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b9,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b1,start:b7,x:b2,y:b0,platform:Linux,
050000006964726f69643a636f6e0000,idroidcon Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
03000000b50700001503000010010000,Impact,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Linux,
@@ -1487,6 +1489,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
030000005e040000ea02000008040000,Microsoft Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e040000ea0200000f050000,Microsoft Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
060000005e040000120b000009050000,Microsoft Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
060000005e040000120b000014050000,Microsoft Xbox One,a:b0,b:b1,x:b2,y:b3,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,platform:Linux
030000005e040000e302000003020000,Microsoft Xbox One Elite,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e040000000b000007040000,Microsoft Xbox One Elite 2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b12,paddle2:b14,paddle3:b13,paddle4:b15,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e040000000b000008040000,Microsoft Xbox One Elite 2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b12,paddle2:b14,paddle3:b13,paddle4:b15,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
@@ -1504,7 +1507,6 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
05000000d6200000e589000001000000,Moga 2,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux,
05000000d6200000ad0d000001000000,Moga Pro,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux,
05000000d62000007162000001000000,Moga Pro 2,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux,
03000000c82d00000960000000000000,8BitDo Pro 3,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,paddle1:b17,paddle2:b16,paddle3:b2,paddle4:b5,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c62400002b89000011010000,MOGA XP5A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
05000000c62400002a89000000010000,MOGA XP5A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b22,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
05000000c62400001a89000000010000,MOGA XP5X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
@@ -1512,9 +1514,9 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
030000005e0400008e02000010020000,MSI GC20 V2,a:b0,b:b1,back:b6,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000f70600000100000000010000,N64 Adaptoid,+rightx:b2,+righty:b1,-rightx:b4,-righty:b5,a:b0,b:b3,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b7,start:b8,platform:Linux,
030000006b1400000906000014010000,Nacon Asymmetric Wireless PS4 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000006b140000010c000010010000,Nacon GC400ES,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
0300000085320000030c000011010000,Nacon GC100,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
03000000853200000706000012010000,Nacon GC100,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000006b140000010c000010010000,Nacon GC400ES,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
05000000853200000503000000010000,Nacon MGX Pro,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
0300000085320000170d000011010000,Nacon Revolution 5 Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux,
0300000085320000190d000011010000,Nacon Revolution 5 Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux,
@@ -1800,17 +1802,17 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
05000000434f4d4d414e440000000000,VX Gaming Command Series,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
0000000058626f782033363020576900,Xbox 360 Controller,a:b0,b:b1,back:b14,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,guide:b7,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Linux,
030000005e0400001907000000010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400008e02000000010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400008e02000002010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400008e02000010010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400008e02000014010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400008e02000047010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400008e02000072050000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400009102000007010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e040000a102000000010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e040000a102000007010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e040000a102000030060000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000006f0e00001503000000020000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400008e02000000010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400008e02000010010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400008e02000002010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400008e02000014010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400008e02000047010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400008e02000072050000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e040000a102000014010000,Xbox 360 Receiver,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
0000000058626f782047616d65706100,Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400000202000000010000,Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b4,platform:Linux,
+356
View File
@@ -0,0 +1,356 @@
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
// SPDX-License-Identifier: GPL-3.0+
#include "AsyncDialogs.h"
#include "common/Assertions.h"
#include <QtWidgets/QPushButton>
template <typename Value>
static std::function<void(std::optional<Value>)> wrapValueCallback(std::function<void(Value)> callback)
{
return [callback = std::move(callback)](std::optional<Value> input) {
if (input.has_value())
callback(std::move(*input));
};
}
void AsyncDialogs::getText(
QWidget* parent,
const QString& title,
const QString& label,
const QString& text,
std::function<void(QString)> value_callback)
{
getText(parent, title, label, QLineEdit::Normal, text, {}, Qt::ImhNone, wrapValueCallback(std::move(value_callback)));
}
void AsyncDialogs::getText(
QWidget* parent,
const QString& title,
const QString& label,
QLineEdit::EchoMode echo,
const QString& text,
Qt::WindowFlags flags,
Qt::InputMethodHints input_method_hints,
std::function<void(std::optional<QString>)> callback)
{
QInputDialog* dialog = new QInputDialog(parent, flags);
dialog->setWindowTitle(title);
dialog->setLabelText(label);
dialog->setTextValue(text);
dialog->setTextEchoMode(echo);
dialog->setInputMethodHints(input_method_hints);
dialog->setAttribute(Qt::WA_DeleteOnClose);
if (callback)
{
QObject::connect(dialog, &QDialog::finished, [dialog, callback = std::move(callback)](int result) {
callback(result ? std::make_optional<QString>(dialog->textValue()) : std::nullopt);
});
}
dialog->open();
}
void AsyncDialogs::getMultiLineText(
QWidget* parent,
const QString& title,
const QString& label,
const QString& text,
std::function<void(QString)> value_callback)
{
getMultiLineText(parent, title, label, text, {}, Qt::ImhNone, wrapValueCallback(std::move(value_callback)));
}
void AsyncDialogs::getMultiLineText(
QWidget* parent,
const QString& title,
const QString& label,
const QString& text,
Qt::WindowFlags flags,
Qt::InputMethodHints input_method_hints,
std::function<void(std::optional<QString>)> callback)
{
QInputDialog* dialog = new QInputDialog(parent, flags);
dialog->setOptions(QInputDialog::UsePlainTextEditForTextInput);
dialog->setWindowTitle(title);
dialog->setLabelText(label);
dialog->setTextValue(text);
dialog->setInputMethodHints(input_method_hints);
dialog->setAttribute(Qt::WA_DeleteOnClose);
if (callback)
{
QObject::connect(dialog, &QDialog::finished, [dialog, callback = std::move(callback)](int result) {
callback(result ? std::make_optional<QString>(dialog->textValue()) : std::nullopt);
});
}
dialog->open();
}
void AsyncDialogs::getItem(
QWidget* parent,
const QString& title,
const QString& label,
const QStringList& items,
int current,
std::function<void(QString)> value_callback)
{
getItem(parent, title, label, items, current, true, {}, Qt::ImhNone, wrapValueCallback(std::move(value_callback)));
}
void AsyncDialogs::getItem(
QWidget* parent,
const QString& title,
const QString& label,
const QStringList& items,
int current,
bool editable,
Qt::WindowFlags flags,
Qt::InputMethodHints input_method_hints,
std::function<void(std::optional<QString>)> callback)
{
const QString text(items.value(current));
QInputDialog* dialog = new QInputDialog(parent, flags);
dialog->setWindowTitle(title);
dialog->setLabelText(label);
dialog->setComboBoxItems(items);
dialog->setTextValue(text);
dialog->setComboBoxEditable(editable);
dialog->setInputMethodHints(input_method_hints);
dialog->setAttribute(Qt::WA_DeleteOnClose);
if (callback)
{
QObject::connect(dialog, &QDialog::finished, [dialog, callback = std::move(callback)](int result) {
callback(result ? std::make_optional<QString>(dialog->textValue()) : std::nullopt);
});
}
dialog->open();
}
void AsyncDialogs::getInt(
QWidget* parent,
const QString& title,
const QString& label,
int value,
std::function<void(int)> value_callback)
{
getInt(parent, title, label, value, -2147483647, 2147483647, 1, {}, wrapValueCallback(std::move(value_callback)));
}
void AsyncDialogs::getInt(
QWidget* parent,
const QString& title,
const QString& label,
int value,
int min_value,
int max_value,
int step,
Qt::WindowFlags flags,
std::function<void(std::optional<int>)> callback)
{
QInputDialog* dialog = new QInputDialog(parent, flags);
dialog->setWindowTitle(title);
dialog->setLabelText(label);
dialog->setIntRange(min_value, max_value);
dialog->setIntValue(value);
dialog->setIntStep(step);
dialog->setAttribute(Qt::WA_DeleteOnClose);
if (callback)
{
QObject::connect(dialog, &QDialog::finished, [dialog, callback = std::move(callback)](int result) {
callback(result ? std::make_optional<int>(dialog->intValue()) : std::nullopt);
});
}
dialog->open();
}
void AsyncDialogs::getDouble(
QWidget* parent,
const QString& title,
const QString& label,
double value,
std::function<void(double)> callback)
{
getDouble(parent, title, label, value, -2147483647, 2147483647, 1, {}, 1, wrapValueCallback(std::move(callback)));
}
void AsyncDialogs::getDouble(
QWidget* parent,
const QString& title,
const QString& label,
double value,
double min_value,
double max_value,
int decimals,
Qt::WindowFlags flags,
double step,
std::function<void(std::optional<double>)> callback)
{
QInputDialog* dialog = new QInputDialog(parent, flags);
dialog->setWindowTitle(title);
dialog->setLabelText(label);
dialog->setDoubleDecimals(decimals);
dialog->setDoubleRange(min_value, max_value);
dialog->setDoubleValue(value);
dialog->setDoubleStep(step);
dialog->setAttribute(Qt::WA_DeleteOnClose);
if (callback)
{
QObject::connect(dialog, &QDialog::finished, [dialog, callback = std::move(callback)](int result) {
callback(result ? std::make_optional<double>(dialog->doubleValue()) : std::nullopt);
});
}
dialog->open();
}
// Based on the QMessageBoxPrivate::showNewMessageBox function from Qt Widgets.
static void openAsyncMessageBox(QWidget* parent,
QMessageBox::Icon icon,
const QString& title,
const QString& text,
QMessageBox::StandardButtons buttons,
QMessageBox::StandardButton default_button,
std::function<void(QMessageBox::StandardButton)> callback)
{
// Don't support the fallback for Qt 4.
pxAssert(!(default_button && !(buttons & default_button)));
QMessageBox* message_box = new QMessageBox(icon, title, text, QMessageBox::NoButton, parent);
message_box->setAttribute(Qt::WA_DeleteOnClose);
const QDialogButtonBox* button_box = message_box->findChild<QDialogButtonBox*>();
pxAssert(button_box);
u32 mask = QMessageBox::FirstButton;
while (mask <= QMessageBox::LastButton)
{
QMessageBox::StandardButton standard_button =
static_cast<QMessageBox::StandardButton>(static_cast<u32>(buttons) & mask);
mask <<= 1;
if (standard_button == QMessageBox::NoButton)
continue;
QPushButton* button = message_box->addButton(standard_button);
if (message_box->defaultButton())
continue;
if ((default_button == QMessageBox::NoButton &&
button_box->buttonRole(button) == QDialogButtonBox::AcceptRole) ||
(default_button != QMessageBox::NoButton &&
standard_button == default_button))
message_box->setDefaultButton(button);
}
if (callback)
{
QObject::connect(message_box, &QMessageBox::finished, [message_box, callback = std::move(callback)](int result) {
callback(message_box->standardButton(message_box->clickedButton()));
});
}
message_box->open();
}
void AsyncDialogs::information(
QWidget* parent,
const QString& title,
const QString& text,
std::function<void(QMessageBox::StandardButton)> callback)
{
information(parent, title, text, QMessageBox::Ok, QMessageBox::NoButton, std::move(callback));
}
void AsyncDialogs::information(
QWidget* parent,
const QString& title,
const QString& text,
QMessageBox::StandardButtons buttons,
QMessageBox::StandardButton default_button,
std::function<void(QMessageBox::StandardButton)> callback)
{
openAsyncMessageBox(parent, QMessageBox::Information, title, text, buttons, default_button, std::move(callback));
}
void AsyncDialogs::question(
QWidget* parent,
const QString& title,
const QString& text,
std::function<void()> yes_callback)
{
std::function<void(QMessageBox::StandardButton)> callback;
if (yes_callback)
{
callback = [yes_callback = std::move(yes_callback)](QMessageBox::StandardButton result) {
if (result == QMessageBox::Yes)
yes_callback();
};
}
const QMessageBox::StandardButtons buttons(QMessageBox::Yes | QMessageBox::No);
question(parent, title, text, buttons, QMessageBox::NoButton, std::move(callback));
}
void AsyncDialogs::question(
QWidget* parent,
const QString& title,
const QString& text,
QMessageBox::StandardButtons buttons,
QMessageBox::StandardButton default_button,
std::function<void(QMessageBox::StandardButton)> callback)
{
openAsyncMessageBox(parent, QMessageBox::Question, title, text, buttons, default_button, std::move(callback));
}
void AsyncDialogs::warning(
QWidget* parent,
const QString& title,
const QString& text,
std::function<void(QMessageBox::StandardButton)> callback)
{
warning(parent, title, text, QMessageBox::Ok, QMessageBox::NoButton, std::move(callback));
}
void AsyncDialogs::warning(
QWidget* parent,
const QString& title,
const QString& text,
QMessageBox::StandardButtons buttons,
QMessageBox::StandardButton default_button,
std::function<void(QMessageBox::StandardButton)> callback)
{
openAsyncMessageBox(parent, QMessageBox::Warning, title, text, buttons, default_button, std::move(callback));
}
void AsyncDialogs::critical(
QWidget* parent,
const QString& title,
const QString& text,
std::function<void(QMessageBox::StandardButton)> callback)
{
critical(parent, title, text, QMessageBox::Ok, QMessageBox::NoButton, std::move(callback));
}
void AsyncDialogs::critical(
QWidget* parent,
const QString& title,
const QString& text,
QMessageBox::StandardButtons buttons,
QMessageBox::StandardButton default_button,
std::function<void(QMessageBox::StandardButton)> callback)
{
openAsyncMessageBox(parent, QMessageBox::Critical, title, text, buttons, default_button, std::move(callback));
}
+178
View File
@@ -0,0 +1,178 @@
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
// SPDX-License-Identifier: GPL-3.0+
#pragma once
#include <QtWidgets/QInputDialog>
#include <QtWidgets/QMessageBox>
#include <functional>
/// A collection of helper functions for opening asynchronous dialog boxes.
/// These should be used in place of Qt's built-in blocking functions as those
/// are prone to crashing if the parent is destroyed while the dialog is open.
namespace AsyncDialogs
{
/// Replacement for QInputDialog::getText.
void getText(
QWidget* parent,
const QString& title,
const QString& label,
const QString& text,
std::function<void(QString)> value_callback);
/// Replacement for QInputDialog::getText.
void getText(
QWidget* parent,
const QString& title,
const QString& label,
QLineEdit::EchoMode echo,
const QString& text,
Qt::WindowFlags flags,
Qt::InputMethodHints input_method_hints,
std::function<void(std::optional<QString>)> callback);
/// Replacement for QInputDialog::getMultiLineText.
void getMultiLineText(
QWidget* parent,
const QString& title,
const QString& label,
const QString& text,
std::function<void(QString)> value_callback);
/// Replacement for QInputDialog::getMultiLineText.
void getMultiLineText(
QWidget* parent,
const QString& title,
const QString& label,
const QString& text,
Qt::WindowFlags flags,
Qt::InputMethodHints input_method_hints,
std::function<void(std::optional<QString>)> callback);
/// Replacement for QInputDialog::getItem.
void getItem(
QWidget* parent,
const QString& title,
const QString& label,
const QStringList& items,
int current,
std::function<void(QString)> value_callback);
/// Replacement for QInputDialog::getItem.
void getItem(
QWidget* parent,
const QString& title,
const QString& label,
const QStringList& items,
int current,
bool editable,
Qt::WindowFlags flags,
Qt::InputMethodHints input_method_hints,
std::function<void(std::optional<QString>)> callback);
/// Replacement for QInputDialog::getInt.
void getInt(
QWidget* parent,
const QString& title,
const QString& label,
int value,
std::function<void(int)> value_callback);
/// Replacement for QInputDialog::getInt.
void getInt(
QWidget* parent,
const QString& title,
const QString& label,
int value,
int min_value,
int max_value,
int step,
Qt::WindowFlags flags,
std::function<void(std::optional<int>)> callback);
/// Replacement for QInputDialog::getDouble.
void getDouble(
QWidget* parent,
const QString& title,
const QString& label,
double value,
std::function<void(double)> value_callback);
/// Replacement for QInputDialog::getDouble.
void getDouble(
QWidget* parent,
const QString& title,
const QString& label,
double value,
double min_value,
double max_value,
int decimals,
Qt::WindowFlags flags,
double step,
std::function<void(std::optional<double>)> callback);
/// Replacement for QMessageBox::information.
void information(
QWidget* parent,
const QString& title,
const QString& text,
std::function<void(QMessageBox::StandardButton)> callback = {});
/// Replacement for QMessageBox::information.
void information(
QWidget* parent,
const QString& title,
const QString& text,
QMessageBox::StandardButtons buttons,
QMessageBox::StandardButton default_button,
std::function<void(QMessageBox::StandardButton)> callback = {});
/// Replacement for QMessageBox::question.
void question(
QWidget* parent,
const QString& title,
const QString& text,
std::function<void()> yes_callback);
/// Replacement for QMessageBox::question.
void question(
QWidget* parent,
const QString& title,
const QString& text,
QMessageBox::StandardButtons buttons,
QMessageBox::StandardButton default_button,
std::function<void(QMessageBox::StandardButton)> callback);
/// Replacement for QMessageBox::warning.
void warning(
QWidget* parent,
const QString& title,
const QString& text,
std::function<void(QMessageBox::StandardButton)> callback = {});
/// Replacement for QMessageBox::warning.
void warning(
QWidget* parent,
const QString& title,
const QString& text,
QMessageBox::StandardButtons buttons,
QMessageBox::StandardButton default_button,
std::function<void(QMessageBox::StandardButton)> callback = {});
/// Replacement for QMessageBox::critical.
void critical(
QWidget* parent,
const QString& title,
const QString& text,
std::function<void(QMessageBox::StandardButton)> callback = {});
/// Replacement for QMessageBox::critical.
void critical(
QWidget* parent,
const QString& title,
const QString& text,
QMessageBox::StandardButtons buttons,
QMessageBox::StandardButton default_button,
std::function<void(QMessageBox::StandardButton)> callback = {});
} // namespace AsyncDialogs
+2
View File
@@ -10,6 +10,8 @@ target_sources(pcsx2-qt PRIVATE
AboutDialog.cpp
AboutDialog.h
AboutDialog.ui
AsyncDialogs.cpp
AsyncDialogs.h
AutoUpdaterDialog.cpp
AutoUpdaterDialog.h
AutoUpdaterDialog.ui
@@ -2,12 +2,13 @@
// SPDX-License-Identifier: GPL-3.0+
#include "BreakpointDialog.h"
#include "DebugTools/Breakpoints.h"
#include "AsyncDialogs.h"
#include "QtUtils.h"
#include "QtHost.h"
#include <QtWidgets/QDialog>
#include <QtWidgets/QMessageBox>
#include "Debugger/DebuggerWindow.h"
#include "DebugTools/Breakpoints.h"
BreakpointDialog::BreakpointDialog(QWidget* parent, DebugInterface* cpu, BreakpointModel& model)
: QDialog(parent)
@@ -100,7 +101,7 @@ void BreakpointDialog::accept()
u64 address;
if (!m_cpu->evaluateExpression(m_ui.txtAddress->text().toStdString().c_str(), address, error))
{
QMessageBox::warning(this, tr("Invalid Address"), QString::fromStdString(error));
AsyncDialogs::warning(g_debugger_window, tr("Invalid Address"), QString::fromStdString(error));
return;
}
@@ -116,7 +117,7 @@ void BreakpointDialog::accept()
if (!m_cpu->initExpression(m_ui.txtCondition->text().toStdString().c_str(), expr, error))
{
QMessageBox::warning(this, tr("Invalid Condition"), QString::fromStdString(error));
AsyncDialogs::warning(g_debugger_window, tr("Invalid Condition"), QString::fromStdString(error));
return;
}
@@ -134,14 +135,14 @@ void BreakpointDialog::accept()
u64 startAddress;
if (!m_cpu->evaluateExpression(m_ui.txtAddress->text().toStdString().c_str(), startAddress, error))
{
QMessageBox::warning(this, tr("Invalid Address"), QString::fromStdString(error));
AsyncDialogs::warning(g_debugger_window, tr("Invalid Address"), QString::fromStdString(error));
return;
}
u64 size;
if (!m_cpu->evaluateExpression(m_ui.txtSize->text().toStdString().c_str(), size, error) || !size)
{
QMessageBox::warning(this, tr("Invalid Size"), QString::fromStdString(error));
AsyncDialogs::warning(g_debugger_window, tr("Invalid Size"), QString::fromStdString(error));
return;
}
@@ -157,7 +158,7 @@ void BreakpointDialog::accept()
PostfixExpression expr;
if (!m_cpu->initExpression(m_ui.txtCondition->text().toStdString().c_str(), expr, error))
{
QMessageBox::warning(this, tr("Invalid Condition"), QString::fromStdString(error));
AsyncDialogs::warning(g_debugger_window, tr("Invalid Condition"), QString::fromStdString(error));
return;
}
@@ -3,9 +3,11 @@
#include "BreakpointModel.h"
#include "AsyncDialogs.h"
#include "QtHost.h"
#include "QtUtils.h"
#include "Debugger/DebuggerSettingsManager.h"
#include "Debugger/DebuggerWindow.h"
#include "DebugTools/DebugInterface.h"
#include "DebugTools/Breakpoints.h"
@@ -13,7 +15,6 @@
#include "common/Console.h"
#include <QtCore/QPointer>
#include <QtWidgets/QMessageBox>
#include <algorithm>
@@ -385,7 +386,7 @@ bool BreakpointModel::setData(const QModelIndex& index, const QVariant& value, i
std::string error;
if (!m_cpu.initExpression(condValue.toLocal8Bit().constData(), expr, error))
{
QMessageBox::warning(nullptr, "Condition Error", QString::fromStdString(error));
AsyncDialogs::warning(g_debugger_window, "Condition Error", QString::fromStdString(error));
return false;
}
@@ -419,7 +420,7 @@ bool BreakpointModel::setData(const QModelIndex& index, const QVariant& value, i
std::string error;
if (!m_cpu.initExpression(condValue.toLocal8Bit().constData(), expr, error))
{
QMessageBox::warning(nullptr, "Condition Error", QString::fromStdString(error));
AsyncDialogs::warning(g_debugger_window, "Condition Error", QString::fromStdString(error));
return false;
}
+11 -10
View File
@@ -3,6 +3,7 @@
#include "DebuggerWindow.h"
#include "AsyncDialogs.h"
#include "Debugger/DebuggerView.h"
#include "Debugger/Docking/DockManager.h"
@@ -15,8 +16,6 @@
#include "MainWindow.h"
#include "AnalysisOptionsDialog.h"
#include <QtWidgets/QMessageBox>
DebuggerWindow* g_debugger_window = nullptr;
DebuggerWindow::DebuggerWindow(QWidget* parent)
@@ -70,19 +69,21 @@ DebuggerWindow::DebuggerWindow(QWidget* parent)
});
connect(m_ui.actionResetAllLayouts, &QAction::triggered, this, [this]() {
QString text = tr("Are you sure you want to reset all layouts?");
if (QMessageBox::question(g_debugger_window, tr("Confirmation"), text) != QMessageBox::Yes)
return;
const QString title = tr("Confirmation");
const QString text = tr("Are you sure you want to reset all layouts?");
m_dock_manager->resetAllLayouts();
AsyncDialogs::question(this, title, text, [this]() {
m_dock_manager->resetAllLayouts();
});
});
connect(m_ui.actionResetDefaultLayouts, &QAction::triggered, this, [this]() {
QString text = tr("Are you sure you want to reset the default layouts?");
if (QMessageBox::question(g_debugger_window, tr("Confirmation"), text) != QMessageBox::Yes)
return;
const QString title = tr("Confirmation");
const QString text = tr("Are you sure you want to reset the default layouts?");
m_dock_manager->resetDefaultLayouts();
AsyncDialogs::question(this, title, text, [this]() {
m_dock_manager->resetDefaultLayouts();
});
});
connect(g_emu_thread, &EmuThread::onVMPaused, this, []() {
+48 -52
View File
@@ -3,6 +3,7 @@
#include "DisassemblyView.h"
#include "AsyncDialogs.h"
#include "Debugger/DebuggerWindow.h"
#include "Debugger/JsonValueWrapper.h"
#include "Debugger/Breakpoints/BreakpointModel.h"
@@ -18,8 +19,6 @@
#include <QtGui/QMouseEvent>
#include <QtWidgets/QMenu>
#include <QtGui/QClipboard>
#include <QtWidgets/QInputDialog>
#include <QtWidgets/QMessageBox>
#include "SymbolTree/NewSymbolDialogs.h"
#include "common/StringUtil.h"
@@ -111,7 +110,7 @@ void DisassemblyView::contextPasteInstructionText()
{
if (!cpu().isCpuPaused())
{
QMessageBox::warning(this, tr("Assemble Error"), tr("Unable to change assembly while core is running"));
AsyncDialogs::warning(this, tr("Assemble Error"), tr("Unable to change assembly while core is running"));
return;
}
@@ -130,7 +129,7 @@ void DisassemblyView::contextPasteInstructionText()
bool valid = MipsAssembleOpcode(newInstructions[instructionIdx].c_str(), &cpu(), replaceAddress, encodedInstruction, errorText);
if (!valid)
{
QMessageBox::warning(this, tr("Assemble Error"), QString("%1 %2").arg(errorText.c_str()).arg(newInstructions[instructionIdx].c_str()));
AsyncDialogs::warning(this, tr("Assemble Error"), QString("%1 %2").arg(errorText.c_str()).arg(newInstructions[instructionIdx].c_str()));
return;
}
encodedInstructions.push_back(encodedInstruction);
@@ -148,29 +147,28 @@ void DisassemblyView::contextAssembleInstruction()
{
if (!cpu().isCpuPaused())
{
QMessageBox::warning(this, tr("Assemble Error"), tr("Unable to change assembly while core is running"));
AsyncDialogs::warning(this, tr("Assemble Error"), tr("Unable to change assembly while core is running"));
return;
}
DisassemblyLineInfo line;
bool ok;
m_disassemblyManager.getLine(m_selectedAddressStart, false, line);
QString instruction = QInputDialog::getText(this, tr("Assemble Instruction"), "",
QLineEdit::Normal, QString("%1 %2").arg(line.name.c_str()).arg(line.params.c_str()), &ok);
if (!ok)
return;
const QString title = tr("Assemble Instruction");
const QString text = QString("%1 %2").arg(line.name.c_str()).arg(line.params.c_str());
u32 encodedInstruction;
std::string errorText;
bool valid = MipsAssembleOpcode(instruction.toLocal8Bit().constData(), &cpu(), m_selectedAddressStart, encodedInstruction, errorText);
if (!valid)
{
QMessageBox::warning(this, tr("Assemble Error"), QString::fromStdString(errorText));
return;
}
AsyncDialogs::getText(this, title, "", text, [this](QString instruction) {
u32 encodedInstruction;
std::string errorText;
bool valid = MipsAssembleOpcode(instruction.toLocal8Bit().constData(), &cpu(), m_selectedAddressStart, encodedInstruction, errorText);
if (!valid)
{
AsyncDialogs::warning(this, tr("Assemble Error"), QString::fromStdString(errorText));
return;
}
setInstructions(m_selectedAddressStart, m_selectedAddressEnd, encodedInstruction);
setInstructions(m_selectedAddressStart, m_selectedAddressEnd, encodedInstruction);
});
}
void DisassemblyView::contextNoopInstruction()
@@ -249,34 +247,34 @@ void DisassemblyView::contextFollowBranch()
void DisassemblyView::contextGoToAddress()
{
bool ok;
const QString targetString = QInputDialog::getText(this, tr("Go To In Disassembly"), "",
QLineEdit::Normal, "", &ok);
const QString title = tr("Go To In Disassembly");
if (!ok)
return;
AsyncDialogs::getText(this, title, "", "", [this](QString expression) {
u64 address = 0;
std::string error;
if (!cpu().evaluateExpression(expression.toStdString().c_str(), address, error))
{
AsyncDialogs::warning(this, tr("Cannot Go To"), QString::fromStdString(error));
return;
}
u64 address = 0;
std::string error;
if (!cpu().evaluateExpression(targetString.toStdString().c_str(), address, error))
{
QMessageBox::warning(this, tr("Cannot Go To"), QString::fromStdString(error));
return;
}
gotoAddressAndSetFocus(static_cast<u32>(address) & ~3);
gotoAddressAndSetFocus(static_cast<u32>(address) & ~3);
});
}
void DisassemblyView::contextAddFunction()
{
NewFunctionDialog* dialog = new NewFunctionDialog(cpu(), this);
dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->setName(QString("func_%1").arg(m_selectedAddressStart, 8, 16, QChar('0')));
dialog->setAddress(m_selectedAddressStart);
dialog->setAttribute(Qt::WA_DeleteOnClose);
if (m_selectedAddressEnd != m_selectedAddressStart)
dialog->setCustomSize(m_selectedAddressEnd - m_selectedAddressStart + 4);
if (dialog->exec() == QDialog::Accepted)
update();
connect(dialog, &QDialog::accepted, this, [this]() { update(); });
dialog->open();
}
void DisassemblyView::contextCopyFunctionName()
@@ -304,28 +302,26 @@ void DisassemblyView::contextRemoveFunction()
void DisassemblyView::contextRenameFunction()
{
const FunctionInfo curFunc = cpu().GetSymbolGuardian().FunctionOverlappingAddress(m_selectedAddressStart);
if (!curFunc.address.valid())
{
QMessageBox::warning(this, tr("Rename Function Error"), tr("No function / symbol is currently selected."));
AsyncDialogs::warning(this, tr("Rename Function Error"), tr("No function / symbol is currently selected."));
return;
}
QString oldName = QString::fromStdString(curFunc.name);
const QString title = tr("Rename Function");
const QString label = tr("Function name");
const QString oldName = QString::fromStdString(curFunc.name);
bool ok;
QString newName = QInputDialog::getText(this, tr("Rename Function"), tr("Function name"), QLineEdit::Normal, oldName, &ok);
if (!ok)
return;
AsyncDialogs::getText(this, title, label, oldName, [this, curFunc](QString newName) {
if (newName.isEmpty())
{
AsyncDialogs::warning(this, tr("Rename Function Error"), tr("Function name cannot be nothing."));
return;
}
if (newName.isEmpty())
{
QMessageBox::warning(this, tr("Rename Function Error"), tr("Function name cannot be nothing."));
return;
}
cpu().GetSymbolGuardian().ReadWrite([&](ccc::SymbolDatabase& database) {
database.functions.rename_symbol(curFunc.handle, newName.toStdString());
cpu().GetSymbolGuardian().ReadWrite([&](ccc::SymbolDatabase& database) {
database.functions.rename_symbol(curFunc.handle, newName.toStdString());
});
});
}
@@ -375,7 +371,7 @@ void DisassemblyView::contextRestoreFunction()
}
else
{
QMessageBox::warning(this, tr("Restore Function Error"), tr("Unable to stub selected address."));
AsyncDialogs::warning(this, tr("Restore Function Error"), tr("Unable to stub selected address."));
}
}
+56 -35
View File
@@ -3,6 +3,7 @@
#include "DockManager.h"
#include "AsyncDialogs.h"
#include "Debugger/DebuggerView.h"
#include "Debugger/DebuggerWindow.h"
#include "Debugger/Docking/DockTables.h"
@@ -24,7 +25,6 @@
#include <QtCore/QTimer>
#include <QtCore/QtTranslation>
#include <QtWidgets/QMessageBox>
#include <QtWidgets/QProxyStyle>
#include <QtWidgets/QStyleFactory>
@@ -518,17 +518,19 @@ void DockManager::newLayoutClicked()
if (m_menu_bar)
m_menu_bar->onCurrentLayoutChanged(m_current_layout);
auto name_validator = [this](const QString& name) {
const auto name_validator = [this](const QString& name) {
return !hasNameConflict(name, DockLayout::INVALID_INDEX);
};
bool can_clone_current_layout = m_current_layout != DockLayout::INVALID_INDEX;
const bool can_clone_current_layout = m_current_layout != DockLayout::INVALID_INDEX;
QPointer<LayoutEditorDialog> dialog = new LayoutEditorDialog(
name_validator, can_clone_current_layout, g_debugger_window);
LayoutEditorDialog* dialog = new LayoutEditorDialog(name_validator, can_clone_current_layout, g_debugger_window);
dialog->setAttribute(Qt::WA_DeleteOnClose);
connect(dialog, &QDialog::accepted, this, [this, dialog, name_validator]() {
if (!name_validator(dialog->name()))
return;
if (dialog->exec() == QDialog::Accepted && name_validator(dialog->name()))
{
DockLayout::Index new_layout = DockLayout::INVALID_INDEX;
const auto [mode, index] = dialog->initialState();
@@ -565,9 +567,9 @@ void DockManager::newLayoutClicked()
updateLayoutSwitcher();
switchToLayout(new_layout);
}
}
});
delete dialog.get();
dialog->open();
}
void DockManager::openLayoutSwitcherContextMenu(const QPoint& pos, QTabBar* layout_switcher)
@@ -605,26 +607,33 @@ void DockManager::editLayoutClicked(DockLayout::Index layout_index)
if (layout_index >= m_layouts.size())
return;
DockLayout& layout = m_layouts[layout_index];
const DockLayout& layout = m_layouts[layout_index];
auto name_validator = [this, layout_index](const QString& name) {
const auto name_validator = [this, layout_index](const QString& name) {
return !hasNameConflict(name, layout_index);
};
QPointer<LayoutEditorDialog> dialog = new LayoutEditorDialog(
layout.name(), layout.cpu(), name_validator, g_debugger_window);
LayoutEditorDialog* dialog = new LayoutEditorDialog(layout.name(), layout.cpu(), name_validator, g_debugger_window);
dialog->setAttribute(Qt::WA_DeleteOnClose);
if (dialog->exec() != QDialog::Accepted || !name_validator(dialog->name()))
return;
connect(dialog, &QDialog::accepted, this, [this, layout_index, dialog, name_validator]() {
if (layout_index >= m_layouts.size())
return;
layout.setName(dialog->name());
layout.setCpu(dialog->cpu());
DockLayout& layout = m_layouts[layout_index];
layout.save(layout_index);
if (!name_validator(dialog->name()))
return;
delete dialog.get();
layout.setName(dialog->name());
layout.setCpu(dialog->cpu());
updateLayoutSwitcher();
layout.save(layout_index);
updateLayoutSwitcher();
});
dialog->open();
}
void DockManager::resetLayoutClicked(DockLayout::Index layout_index)
@@ -636,20 +645,28 @@ void DockManager::resetLayoutClicked(DockLayout::Index layout_index)
if (!layout.canReset())
return;
QString text = tr("Are you sure you want to reset layout '%1'?").arg(layout.name());
if (QMessageBox::question(g_debugger_window, tr("Confirmation"), text) != QMessageBox::Yes)
return;
const QString title = tr("Confirmation");
const QString text = tr("Are you sure you want to reset layout '%1'?").arg(layout.name());
bool current_layout = layout_index == m_current_layout;
AsyncDialogs::question(g_debugger_window, title, text, [this, layout_index]() {
if (layout_index >= m_layouts.size())
return;
if (current_layout)
switchToLayout(DockLayout::INVALID_INDEX);
DockLayout& layout = m_layouts[layout_index];
if (!layout.canReset())
return;
layout.reset();
layout.save(layout_index);
bool current_layout = layout_index == m_current_layout;
if (current_layout)
switchToLayout(layout_index);
if (current_layout)
switchToLayout(DockLayout::INVALID_INDEX);
layout.reset();
layout.save(layout_index);
if (current_layout)
switchToLayout(layout_index);
});
}
void DockManager::deleteLayoutClicked(DockLayout::Index layout_index)
@@ -659,12 +676,16 @@ void DockManager::deleteLayoutClicked(DockLayout::Index layout_index)
DockLayout& layout = m_layouts[layout_index];
QString text = tr("Are you sure you want to delete layout '%1'?").arg(layout.name());
if (QMessageBox::question(g_debugger_window, tr("Confirmation"), text) != QMessageBox::Yes)
return;
const QString title = tr("Confirmation");
const QString text = tr("Are you sure you want to delete layout '%1'?").arg(layout.name());
deleteLayout(layout_index);
updateLayoutSwitcher();
AsyncDialogs::question(g_debugger_window, title, text, [this, layout_index]() {
if (layout_index >= m_layouts.size())
return;
deleteLayout(layout_index);
updateLayoutSwitcher();
});
}
void DockManager::layoutSwitcherTabMoved(DockLayout::Index from_index, DockLayout::Index to_index)
+15 -13
View File
@@ -3,6 +3,7 @@
#include "DockViews.h"
#include "AsyncDialogs.h"
#include "QtUtils.h"
#include "Debugger/DebuggerView.h"
#include "Debugger/DebuggerWindow.h"
@@ -17,8 +18,6 @@
#include <QtGui/QActionGroup>
#include <QtGui/QPalette>
#include <QtWidgets/QInputDialog>
#include <QtWidgets/QMessageBox>
#include <QtWidgets/QMenu>
#include <QtWidgets/QStyleFactory>
@@ -176,19 +175,22 @@ void DockTabBar::openContextMenu(QPoint pos)
if (!widget)
return;
bool ok;
QString new_name = QInputDialog::getText(
this, tr("Rename Window"), tr("New name:"), QLineEdit::Normal, widget->displayNameWithoutSuffix(), &ok);
if (!ok)
return;
const QString title = tr("Rename Window");
const QString label = tr("New name:");
const QString text = widget->displayNameWithoutSuffix();
if (!widget->setCustomDisplayName(new_name))
{
QMessageBox::warning(this, tr("Invalid Name"), tr("The specified name is too long."));
return;
}
AsyncDialogs::getText(this, title, label, text, [this, widget = QPointer(widget)](QString name) {
if (!widget || !g_debugger_window)
return;
g_debugger_window->dockManager().updateDockWidgetTitles();
if (!widget->setCustomDisplayName(name))
{
AsyncDialogs::warning(this, tr("Invalid Name"), tr("The specified name is too long."));
return;
}
g_debugger_window->dockManager().updateDockWidgetTitles();
});
});
QAction* reset_name_action = menu->addAction(tr("Reset Name"));
+10 -10
View File
@@ -3,16 +3,16 @@
#include "MemorySearchView.h"
#include "DebugTools/DebugInterface.h"
#include "AsyncDialogs.h"
#include "QtUtils.h"
#include "DebugTools/DebugInterface.h"
#include "common/Console.h"
#include <QtGui/QClipboard>
#include <QtWidgets/QMenu>
#include <QtWidgets/QScrollBar>
#include <QtWidgets/QMessageBox>
#include <QtConcurrent/QtConcurrent>
#include <QtCore/QFutureWatcher>
#include <QtGui/QPainter>
@@ -478,7 +478,7 @@ void MemorySearchView::onSearchButtonClicked()
if (!ok)
{
QMessageBox::critical(this, tr("Debugger"), tr("Invalid start address"));
AsyncDialogs::critical(this, tr("Debugger"), tr("Invalid start address"));
return;
}
@@ -486,13 +486,13 @@ void MemorySearchView::onSearchButtonClicked()
if (!ok)
{
QMessageBox::critical(this, tr("Debugger"), tr("Invalid end address"));
AsyncDialogs::critical(this, tr("Debugger"), tr("Invalid end address"));
return;
}
if (searchStart >= searchEnd)
{
QMessageBox::critical(this, tr("Debugger"), tr("Start address can't be equal to or greater than the end address"));
AsyncDialogs::critical(this, tr("Debugger"), tr("Start address can't be equal to or greater than the end address"));
return;
}
@@ -527,7 +527,7 @@ void MemorySearchView::onSearchButtonClicked()
if (!ok)
{
QMessageBox::critical(this, tr("Debugger"), tr("Invalid search value"));
AsyncDialogs::critical(this, tr("Debugger"), tr("Invalid search value"));
return;
}
@@ -551,7 +551,7 @@ void MemorySearchView::onSearchButtonClicked()
if (value <= std::numeric_limits<unsigned char>::max())
break;
default:
QMessageBox::critical(this, tr("Debugger"), tr("Value is larger than type"));
AsyncDialogs::critical(this, tr("Debugger"), tr("Value is larger than type"));
return;
}
}
@@ -565,7 +565,7 @@ void MemorySearchView::onSearchButtonClicked()
searchComparison == SearchComparison::IncreasedBy ||
searchComparison == SearchComparison::NotChanged))
{
QMessageBox::critical(this, tr("Debugger"), tr("This search comparison can only be used with filter searches."));
AsyncDialogs::critical(this, tr("Debugger"), tr("This search comparison can only be used with filter searches."));
return;
}
}
@@ -578,7 +578,7 @@ void MemorySearchView::onSearchButtonClicked()
searchComparison == SearchComparison::IncreasedBy ||
searchComparison == SearchComparison::NotChanged))
{
QMessageBox::critical(this, tr("Debugger"), tr("This search comparison can only be used with filter searches."));
AsyncDialogs::critical(this, tr("Debugger"), tr("This search comparison can only be used with filter searches."));
return;
}
+35 -42
View File
@@ -3,6 +3,7 @@
#include "MemoryView.h"
#include "AsyncDialogs.h"
#include "Debugger/JsonValueWrapper.h"
#include "QtHost.h"
@@ -12,8 +13,6 @@
#include <QtGui/QActionGroup>
#include <QtGui/QClipboard>
#include <QtGui/QMouseEvent>
#include <QtWidgets/QInputDialog>
#include <QtWidgets/QMessageBox>
using namespace QtUtils;
@@ -305,36 +304,33 @@ bool MemoryViewTable::InsertFloatIntoSelectedHexView(DebugInterface& cpu)
std::memcpy(&currentFloatVal, &currentIntVal, sizeof(currentFloatVal));
const QString currentfloatStr = QString("%1").arg(QString::number(currentFloatVal, 'g'), 14).trimmed();
// Prompt user to enter a new float value
bool isValidInput = false;
QString newFloatStr = QInputDialog::getText(parent, tr("Input New Float"), "",
QLineEdit::Normal, currentfloatStr, &isValidInput);
if (!isValidInput)
return false;
const QString title = tr("Input New Float");
// Convert string into float value
bool isValidFloat = false;
const float newFloatVal = newFloatStr.toFloat(&isValidFloat);
if (!isValidFloat)
{
QMessageBox::warning(parent, tr("Input Error"), tr("Invalid float value"));
return false;
}
AsyncDialogs::getText(parent, title, "", currentfloatStr, [this, &cpu](QString newFloatStr) {
// Convert string into float value
bool isValidFloat = false;
const float newFloatVal = newFloatStr.toFloat(&isValidFloat);
if (!isValidFloat)
{
AsyncDialogs::warning(parent, tr("Input Error"), tr("Invalid float value"));
return;
}
// Write new float value back to memory
u32 newIntVal = 0;
std::memcpy(&newIntVal, &newFloatVal, sizeof(newIntVal));
newIntVal = convertEndian(newIntVal);
// Write new float value back to memory
u32 newIntVal = 0;
std::memcpy(&newIntVal, &newFloatVal, sizeof(newIntVal));
newIntVal = convertEndian(newIntVal);
const QPointer<MemoryViewTable> table(this);
Host::RunOnCPUThread([table, address = selectedAddress, &cpu, val = newIntVal] {
cpu.write32(address, val);
const QPointer<MemoryViewTable> table(this);
Host::RunOnCPUThread([table, address = selectedAddress, &cpu, val = newIntVal] {
cpu.write32(address, val);
QtHost::RunOnUIThread([table] {
if (!table)
return;
QtHost::RunOnUIThread([table] {
if (!table)
return;
table->parent->update();
table->parent->update();
});
});
});
@@ -353,7 +349,7 @@ void MemoryViewTable::InsertAtCurrentSelection(const QString& text, DebugInterfa
const float newFloatVal = text.toFloat(&isValidFloat);
if (!isValidFloat)
{
QMessageBox::warning(parent, tr("Input Error"), tr("Invalid float value"));
AsyncDialogs::warning(parent, tr("Input Error"), tr("Invalid float value"));
return;
}
@@ -899,22 +895,19 @@ void MemoryView::contextPaste()
void MemoryView::contextGoToAddress()
{
bool ok;
QString targetString = QInputDialog::getText(this, tr("Go To In Memory View"), "",
QLineEdit::Normal, "", &ok);
const QString title = tr("Go To In Memory View");
if (!ok)
return;
AsyncDialogs::getText(this, title, "", "", [this](QString expression) {
u64 address = 0;
std::string error;
if (!cpu().evaluateExpression(expression.toStdString().c_str(), address, error))
{
AsyncDialogs::warning(this, tr("Cannot Go To"), QString::fromStdString(error));
return;
}
u64 address = 0;
std::string error;
if (!cpu().evaluateExpression(targetString.toStdString().c_str(), address, error))
{
QMessageBox::warning(this, tr("Cannot Go To"), QString::fromStdString(error));
return;
}
gotoAddress(static_cast<u32>(address));
gotoAddress(static_cast<u32>(address));
});
}
void MemoryView::contextFollowAddress()
+61 -53
View File
@@ -3,17 +3,16 @@
#include "RegisterView.h"
#include "AsyncDialogs.h"
#include "QtUtils.h"
#include "Debugger/JsonValueWrapper.h"
#include "QtUtils.h"
#include <QtGui/QMouseEvent>
#include <QtWidgets/QTabBar>
#include <QtWidgets/QStylePainter>
#include <QtWidgets/QStyleOptionTab>
#include <QtGui/QClipboard>
#include <QtWidgets/QInputDialog>
#include <QtWidgets/QProxyStyle>
#include <QtWidgets/QMessageBox>
#include <bit>
@@ -351,12 +350,11 @@ void RegisterView::contextCopySegment()
QApplication::clipboard()->setText(FilledQStringFromValue(val._u32[3 - m_selected128Field], 16));
}
bool RegisterView::contextFetchNewValue(u64& out, u64 currentValue, bool segment)
void RegisterView::fetchNewValue(u64 currentValue, bool segment, std::function<void(u64)> callback)
{
const int categoryIndex = ui.registerTabs->currentIndex();
const bool floatingPoint = CAT_SHOW_FLOAT && segment;
const int regSize = cpu().getRegisterSize(categoryIndex);
bool ok = false;
QString existingValue("%1");
@@ -366,79 +364,89 @@ bool RegisterView::contextFetchNewValue(u64& out, u64 currentValue, bool segment
existingValue = existingValue.arg(std::bit_cast<float>((u32)currentValue));
//: Changing the value in a CPU register (e.g. "Change t0")
QString input = QInputDialog::getText(this, tr("Change %1").arg(cpu().getRegisterName(categoryIndex, m_selectedRow)), "",
QLineEdit::Normal, existingValue, &ok);
const QString title = tr("Change %1").arg(cpu().getRegisterName(categoryIndex, m_selectedRow));
if (!ok)
return false;
if (!floatingPoint) // Get input as hexadecimal
{
out = input.toULongLong(&ok, 16);
if (!ok)
AsyncDialogs::getText(this, title, "", existingValue, [this, callback, floatingPoint](QString input) {
u64 value;
if (!floatingPoint) // Get input as hexadecimal
{
QMessageBox::warning(this, tr("Invalid register value"), tr("Invalid hexadecimal register value."));
return false;
bool ok;
value = input.toULongLong(&ok, 16);
if (!ok)
{
AsyncDialogs::warning(this, tr("Invalid register value"), tr("Invalid hexadecimal register value."));
return;
}
}
}
else
{
out = std::bit_cast<u32>(input.toFloat(&ok));
if (!ok)
else
{
QMessageBox::warning(this, tr("Invalid register value"), tr("Invalid floating-point register value."));
return false;
bool ok;
value = std::bit_cast<u32>(input.toFloat(&ok));
if (!ok)
{
AsyncDialogs::warning(this, tr("Invalid register value"), tr("Invalid floating-point register value."));
return;
}
}
}
return true;
callback(value);
});
}
void RegisterView::contextChangeValue()
{
const int categoryIndex = ui.registerTabs->currentIndex();
u64 newVal;
if (contextFetchNewValue(newVal, cpu().getRegister(categoryIndex, m_selectedRow).lo))
{
cpu().setRegister(categoryIndex, m_selectedRow, u128::From64(newVal));
const int category_index = ui.registerTabs->currentIndex();
const s32 row = m_selectedRow;
const u32 old_value = cpu().getRegister(category_index, row).lo;
fetchNewValue(old_value, false, [this, category_index, row](u64 input) {
cpu().setRegister(category_index, row, u128::From64(input));
DebuggerView::broadcastEvent(DebuggerEvents::VMUpdate());
}
});
}
void RegisterView::contextChangeTop()
{
u64 newVal;
u128 oldVal = cpu().getRegister(ui.registerTabs->currentIndex(), m_selectedRow);
if (contextFetchNewValue(newVal, oldVal.hi))
{
oldVal.hi = newVal;
cpu().setRegister(ui.registerTabs->currentIndex(), m_selectedRow, oldVal);
const int category_index = ui.registerTabs->currentIndex();
const s32 row = m_selectedRow;
const u128 old_value = cpu().getRegister(category_index, row);
fetchNewValue(old_value.hi, false, [this, category_index, row, old_value](u32 input) {
u128 new_value = old_value;
new_value.hi = input;
cpu().setRegister(category_index, row, new_value);
DebuggerView::broadcastEvent(DebuggerEvents::VMUpdate());
}
});
}
void RegisterView::contextChangeBottom()
{
u64 newVal;
u128 oldVal = cpu().getRegister(ui.registerTabs->currentIndex(), m_selectedRow);
if (contextFetchNewValue(newVal, oldVal.lo))
{
oldVal.lo = newVal;
cpu().setRegister(ui.registerTabs->currentIndex(), m_selectedRow, oldVal);
const int category_index = ui.registerTabs->currentIndex();
const s32 row = m_selectedRow;
const u128 old_value = cpu().getRegister(category_index, row);
fetchNewValue(old_value.lo, false, [this, category_index, row, old_value](u32 input) {
u128 new_value = old_value;
new_value.lo = input;
cpu().setRegister(category_index, row, new_value);
DebuggerView::broadcastEvent(DebuggerEvents::VMUpdate());
}
});
}
void RegisterView::contextChangeSegment()
{
u64 newVal;
u128 oldVal = cpu().getRegister(ui.registerTabs->currentIndex(), m_selectedRow);
if (contextFetchNewValue(newVal, oldVal._u32[3 - m_selected128Field], true))
{
oldVal._u32[3 - m_selected128Field] = (u32)newVal;
cpu().setRegister(ui.registerTabs->currentIndex(), m_selectedRow, oldVal);
const int category_index = ui.registerTabs->currentIndex();
const s32 row = m_selectedRow;
const s32 field = m_selected128Field;
const u128 old_value = cpu().getRegister(category_index, row);
const u32 segment = old_value._u32[3 - field];
fetchNewValue(segment, false, [this, category_index, row, field, old_value](u32 input) {
u128 new_value = old_value;
new_value._u32[3 - field] = input;
cpu().setRegister(category_index, row, new_value);
DebuggerView::broadcastEvent(DebuggerEvents::VMUpdate());
}
});
}
std::optional<DebuggerEvents::GoToAddress> RegisterView::contextCreateGotoEvent()
@@ -454,7 +462,7 @@ std::optional<DebuggerEvents::GoToAddress> RegisterView::contextCreateGotoEvent(
if (!cpu().isValidAddress(addr))
{
QMessageBox::warning(
AsyncDialogs::warning(
this,
tr("Invalid target address"),
tr("This register holds an invalid address."));
+1 -2
View File
@@ -49,8 +49,7 @@ public slots:
private:
Ui::RegisterView ui;
// Returns true on success
bool contextFetchNewValue(u64& out, u64 currentValue, bool segment = false);
void fetchNewValue(u64 currentValue, bool segment, std::function<void(u64)> callback);
// Used for the height offset the tab bar creates
// because we share a widget
@@ -3,13 +3,14 @@
#include "NewSymbolDialogs.h"
#include "AsyncDialogs.h"
#include "Debugger/DebuggerWindow.h"
#include "Debugger/SymbolTree/TypeString.h"
#include <QtCore/QTimer>
#include <QtCore/QMetaMethod>
#include <QtWidgets/QMessageBox>
#include <QtWidgets/QPushButton>
#include "TypeString.h"
NewSymbolDialog::NewSymbolDialog(u32 flags, u32 alignment, DebugInterface& cpu, QWidget* parent)
: QDialog(parent)
, m_cpu(cpu)
@@ -359,7 +360,7 @@ void NewFunctionDialog::createSymbol()
});
if (!error_message.isEmpty())
QMessageBox::warning(this, tr("Cannot Create Function"), error_message);
AsyncDialogs::warning(g_debugger_window, tr("Cannot Create Function"), error_message);
}
// *****************************************************************************
@@ -416,7 +417,7 @@ void NewGlobalVariableDialog::createSymbol()
});
if (!error_message.isEmpty())
QMessageBox::warning(this, tr("Cannot Create Global Variable"), error_message);
AsyncDialogs::warning(g_debugger_window, tr("Cannot Create Global Variable"), error_message);
}
// *****************************************************************************
@@ -534,7 +535,7 @@ void NewLocalVariableDialog::createSymbol()
});
if (!error_message.isEmpty())
QMessageBox::warning(this, tr("Cannot Create Local Variable"), error_message);
AsyncDialogs::warning(g_debugger_window, tr("Cannot Create Local Variable"), error_message);
}
// *****************************************************************************
@@ -648,5 +649,5 @@ void NewParameterVariableDialog::createSymbol()
});
if (!error_message.isEmpty())
QMessageBox::warning(this, tr("Cannot Create Parameter Variable"), error_message);
AsyncDialogs::warning(g_debugger_window, tr("Cannot Create Parameter Variable"), error_message);
}
@@ -3,6 +3,7 @@
#include "SymbolTreeDelegates.h"
#include "AsyncDialogs.h"
#include "Debugger/SymbolTree/SymbolTreeModel.h"
#include "Debugger/SymbolTree/TypeString.h"
@@ -10,7 +11,6 @@
#include <QtWidgets/QComboBox>
#include <QtWidgets/QDoubleSpinBox>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QMessageBox>
SymbolTreeValueDelegate::SymbolTreeValueDelegate(
DebugInterface& cpu,
@@ -495,7 +495,7 @@ void SymbolTreeTypeDelegate::setModelData(QWidget* editor, QAbstractItemModel* m
symbol_tree_model->resetChildren(index);
}
else
QMessageBox::warning(editor, tr("Cannot Change Type"), error_message);
AsyncDialogs::warning(editor, tr("Cannot Change Type"), error_message);
}
// *****************************************************************************
@@ -3,15 +3,14 @@
#include "SymbolTreeViews.h"
#include "AsyncDialogs.h"
#include "Debugger/JsonValueWrapper.h"
#include "Debugger/SymbolTree/NewSymbolDialogs.h"
#include "Debugger/SymbolTree/SymbolTreeDelegates.h"
#include <QtGui/QActionGroup>
#include <QtGui/QClipboard>
#include <QtWidgets/QInputDialog>
#include <QtWidgets/QMenu>
#include <QtWidgets/QMessageBox>
#include <QtWidgets/QScrollBar>
static bool testName(const QString& name, const QString& filter);
@@ -643,14 +642,16 @@ void SymbolTreeView::onDeleteButtonPressed()
if (!node->symbol.valid())
return;
if (QMessageBox::question(this, tr("Confirm Deletion"), tr("Delete '%1'?").arg(node->name)) != QMessageBox::Yes)
return;
const QString title = tr("Confirm Deletion");
const QString text = tr("Delete '%1'?").arg(node->name);
cpu().GetSymbolGuardian().ReadWrite([&](ccc::SymbolDatabase& database) {
node->symbol.destroy_symbol(database, true);
AsyncDialogs::question(this, title, text, [this, handle = node->symbol]() {
cpu().GetSymbolGuardian().ReadWrite([&](ccc::SymbolDatabase& database) {
handle.destroy_symbol(database, true);
});
reset();
});
reset();
}
void SymbolTreeView::onCopyName()
@@ -701,13 +702,10 @@ void SymbolTreeView::onRenameSymbol()
text = QString::fromStdString(symbol->name());
});
bool ok;
std::string name = QInputDialog::getText(this, title, label, QLineEdit::Normal, text, &ok).toStdString();
if (!ok)
return;
cpu().GetSymbolGuardian().ReadWrite([&](ccc::SymbolDatabase& database) {
node->symbol.rename_symbol(name, database);
AsyncDialogs::getText(this, title, label, text, [this, handle = node->symbol](QString new_name) {
cpu().GetSymbolGuardian().ReadWrite([&](ccc::SymbolDatabase& database) {
handle.rename_symbol(new_name.toStdString(), database);
});
});
}
@@ -737,18 +735,15 @@ void SymbolTreeView::onChangeTypeTemporarily()
std::optional<QString> old_type = m_model->typeFromModelIndexToString(index);
if (!old_type.has_value())
{
QMessageBox::warning(this, tr("Cannot Change Type"), tr("That node cannot have a type."));
AsyncDialogs::warning(this, tr("Cannot Change Type"), tr("That node cannot have a type."));
return;
}
bool ok;
QString type_string = QInputDialog::getText(this, title, label, QLineEdit::Normal, *old_type, &ok);
if (!ok)
return;
std::optional<QString> error_message = m_model->changeTypeTemporarily(index, type_string.toStdString());
if (error_message.has_value() && !error_message->isEmpty())
QMessageBox::warning(this, tr("Cannot Change Type"), *error_message);
AsyncDialogs::getText(this, title, label, *old_type, [this, index](QString type_string) {
std::optional<QString> error_message = m_model->changeTypeTemporarily(index, type_string.toStdString());
if (error_message.has_value() && !error_message->isEmpty())
AsyncDialogs::warning(this, tr("Cannot Change Type"), *error_message);
});
}
void SymbolTreeView::onTreeViewClicked(const QModelIndex& index)
@@ -862,8 +857,10 @@ void FunctionTreeView::onNewButtonPressed()
{
NewFunctionDialog* dialog = new NewFunctionDialog(cpu(), this);
dialog->setAttribute(Qt::WA_DeleteOnClose);
if (dialog->exec() == QDialog::Accepted)
reset();
connect(dialog, &QDialog::accepted, this, &FunctionTreeView::reset);
dialog->open();
}
// *****************************************************************************
@@ -1005,8 +1002,10 @@ void GlobalVariableTreeView::onNewButtonPressed()
{
NewGlobalVariableDialog* dialog = new NewGlobalVariableDialog(cpu(), this);
dialog->setAttribute(Qt::WA_DeleteOnClose);
if (dialog->exec() == QDialog::Accepted)
reset();
connect(dialog, &QDialog::accepted, this, &GlobalVariableTreeView::reset);
dialog->open();
}
// *****************************************************************************
@@ -1134,8 +1133,10 @@ void LocalVariableTreeView::onNewButtonPressed()
{
NewLocalVariableDialog* dialog = new NewLocalVariableDialog(cpu(), this);
dialog->setAttribute(Qt::WA_DeleteOnClose);
if (dialog->exec() == QDialog::Accepted)
reset();
connect(dialog, &QDialog::accepted, this, &LocalVariableTreeView::reset);
dialog->open();
}
// *****************************************************************************
@@ -1261,8 +1262,10 @@ void ParameterVariableTreeView::onNewButtonPressed()
{
NewParameterVariableDialog* dialog = new NewParameterVariableDialog(cpu(), this);
dialog->setAttribute(Qt::WA_DeleteOnClose);
if (dialog->exec() == QDialog::Accepted)
reset();
connect(dialog, &QDialog::accepted, this, &ParameterVariableTreeView::reset);
dialog->open();
}
static bool testName(const QString& name, const QString& filter)
+2
View File
@@ -89,6 +89,7 @@
<Manifest Include="..\pcsx2\windows\PCSX2.manifest" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="AsyncDialogs.cpp" />
<ClCompile Include="ColorPickerButton.cpp" />
<ClCompile Include="Debugger\SymbolTree\NewSymbolDialogs.cpp" />
<ClCompile Include="Debugger\SymbolTree\SymbolTreeDelegates.cpp" />
@@ -183,6 +184,7 @@
<ClCompile Include="VCRuntimeChecker.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="AsyncDialogs.h" />
<QtMoc Include="SetupWizardDialog.h" />
<QtMoc Include="Settings\InterfaceSettingsWidget.h" />
<QtMoc Include="Settings\GameListSettingsWidget.h" />
+2
View File
@@ -43,6 +43,7 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="PrecompiledHeader.cpp" />
<ClCompile Include="AsyncDialogs.cpp" />
<ClCompile Include="QtHost.cpp" />
<ClCompile Include="MainWindow.cpp" />
<ClCompile Include="$(IntDir)moc_MainWindow.cpp">
@@ -518,6 +519,7 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="PrecompiledHeader.h" />
<ClInclude Include="AsyncDialogs.h" />
<ClInclude Include="QtUtils.h" />
<ClInclude Include="SettingWidgetBinder.h" />
<ClInclude Include="Settings\HddCreateQt.h">