pd-rs / crank

A wrapper for cargo to use creating games for the Playdate handheld gaming system.
MIT License
85 stars 15 forks source link

Fix intermittent (but frequent) failure to copy files #28

Closed kettle11 closed 2 years ago

kettle11 commented 2 years ago

I just got my new playdate and was having a tough time getting crank to successfully copy files to the playdate.

I tracked it down to a timing issue. It seems like the PLAYDATE volume would be mounted but not fully available. This fix changes the code to wait until the "Games" folder can be read.

I also removed another arbitrary sleep that I presume was there to prevent something similar? The new check should more reliably handle whatever that other sleep was for.

Edit: I'm deploying from a Mac

rtsuk commented 2 years ago

Is there any chance in behavior if no playdate is plugged in at all when crank is run?

kettle11 commented 2 years ago

Is there any chance in behavior if no playdate is plugged in at all when crank is run?

I just tried running it without a playdate plugged in with and without this pull request and it does the same thing each time: sleep forever within run_target.