Simulator CLI parameter for headless mode

Hey all!

The most recent version of the PlaydateSDK came with a new popup on the simulator to ask for an email address. This breaks the headless testing we're doing because of the new unexpected dialogue. It's a weird one to debug because the failure just shows up as a timeout on the tests:

Would it be possible to add a CLI flag for the simulator specifically for headless mode? This way, you would be free to add new pop-ups without risking breaking existing testing.

And yes, this is totally Hyrums law in action.

3 Likes


:slightly_smiling_face:

5 Likes

defaults write date.play.simulator elistShown -bool YES

will prevent that from popping up.

7 Likes

On Linux, would that be ShowElist=0 in ~/.Playdate Simulator/Playdate Simulator.ini?

I think that's right, looking at the code. It creates a config object from this path

    wxString iniDirName = wxStandardPaths::Get().GetUserLocalDataDir();
    wxFileName iniFileName(iniDirName, wxString(APP_NAME) + ".ini");

and if ShowElist isn't false and it's already shown the performance warning it'll show the signup dialog. The key for the performance warning is ShowPerfWarning on Linux/Windows and performanceWarningShown on macOS. And like the elist pref you'd set it false in the .ini file but true in macOS defaults to skip the alert. :person_shrugging:

I’ve got a script with a working version you can reference here:

1 Like