Fix emulator build script, UI rendering, and clean up repo
This commit is contained in:
@@ -173,7 +173,7 @@ bool SerialUploader::complete_launch() {
|
||||
return launched;
|
||||
}
|
||||
|
||||
bool SerialUploader::process() {
|
||||
bool SerialUploader::process(bool spi_busy) {
|
||||
if (state == IDLE) {
|
||||
// Check for "UPLOAD" command
|
||||
int c = getchar_timeout_us(0);
|
||||
@@ -311,6 +311,9 @@ bool SerialUploader::process() {
|
||||
}
|
||||
|
||||
if (state == WRITING_FILE) {
|
||||
// Wait if SPI bus is busy (e.g. display refresh in progress on other core)
|
||||
if (spi_busy) return false;
|
||||
|
||||
if (write_file_to_sd()) {
|
||||
state = LAUNCHING_GAME;
|
||||
// Prepare for launch by scanning games, but don't actually launch yet
|
||||
|
||||
@@ -12,7 +12,8 @@ public:
|
||||
|
||||
// Process incoming serial data (call this frequently in main loop)
|
||||
// Returns true if a game was launched
|
||||
bool process();
|
||||
// spi_busy: set to true if SPI bus is currently in use by another core (e.g. display refresh)
|
||||
bool process(bool spi_busy = false);
|
||||
|
||||
// Check if uploader wants to launch a game (after upload complete)
|
||||
bool wants_to_launch_game() const { return state == LAUNCHING_GAME; }
|
||||
|
||||
Reference in New Issue
Block a user