-
-
Notifications
You must be signed in to change notification settings - Fork 62
Closed
Labels
Description
I have the following code:
#include <graphx.h>
#include <stdlib.h>
#include <ti/getcsc.h>
#include <ti/screen.h>
#include <sys/rtc.h>
#include <sys/lcd.h>
#include <sys/util.h>
int main(void)
{
gfx_Begin();
gfx_SetDrawScreen();
int points[6] = {
160, 1, // (x0, y0)
1, 238, // (x1, y1)
318,238, // (x2, y2)
};
int num_points = 3;
gfx_Polygon(points, num_points);
srand(rtc_Time());
while (!os_GetCSC()) {
uint8_t c = random() & 0xFF;
gfx_FloodFill(100, 100, c);
}
gfx_End();
return 0;
}
If you run it for long enough, the calculator eventually freezes. If I replace the core loop with just:
uint8_t c = 1;
while (!os_GetCSC()) {
gfx_FloodFill(100, 100, c++);
}
A freeze never occurs.
Edit to add: I haven't tested in hardware, only cemu.