consider following program / update loop
during the update loop it first draws black and calls pd->graphics->display(); to force update whats in the screen buffer to the screen then "waits" a second and then draws white in the same way.
So you are supposed to see a box appearing in black and disappearing constantly
this is just an extreme example to show the bug in the simulator. Also best to run de simulator from within the debugger as this functionality (probably the delay stuff) makes simulator hard to control / react on your commands (so you can kill it in de debugger).
static volatile char dummy;
void pdDelay(unsigned int milliseconds)
{
unsigned int start = pd->system->getCurrentTimeMilliseconds();
while (start + milliseconds > pd->system->getCurrentTimeMilliseconds())
{
(void)dummy;
}
}
// main update function
int update(void* ud)
{
pd->graphics->clear(kColorWhite);
pd->graphics->fillRect(20, 20, 360, 200,kColorBlack);
pd->graphics->display();
pdDelay(1000);
pd->graphics->fillRect(20, 20, 360, 200, kColorWhite);
pd->graphics->display();
pdDelay(1000);
return 1;
}
on the playdate itself it works as expected (recorded using mirror)
Yet in the simulator the screen remains white constantly which means that pd->graphics->display(); did not update the screen with whats in the screenbuffer and this is a bug then (in the simulator)