I just removed a few checks your code does, and it just works, (lines 116, 112 and 124) . Given that those inis don't exist on the nightly.... I just removed and it's working on PCSX2 on today's nightly version. Thanks!Take two...
Looks to be working for me at least but only when I uncheck "Render to Main Window" (Settings->Interface->Game Display uncheck "Render to Main Window"):
View attachment 3430
Also have to make the main window transparent and toggle the menu:
emuPrimaryWindow.ToggleMenu()
emuPrimaryWindow.Set("Transparent",0)