You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/emscripten_main_loop.cpp
+4-11Lines changed: 4 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -13,10 +13,8 @@ int frame = 0;
13
13
14
14
voidfinal(void*) {
15
15
assert(frame == 110);
16
-
#ifdef REPORT_RESULT
17
16
printf("Test passed.\n");
18
-
REPORT_RESULT(0);
19
-
#endif
17
+
exit(0);
20
18
}
21
19
22
20
voidlooper() {
@@ -29,11 +27,8 @@ void looper() {
29
27
timesTooSoon++;
30
28
if (timesTooSoon >= 10) {
31
29
printf("Abort: main loop tick was called too quickly after the previous frame, too many times!\n");
32
-
#ifdef REPORT_RESULT
33
-
REPORT_RESULT(1);
34
-
#endif
35
30
emscripten_cancel_main_loop();
36
-
exit(0);
31
+
exit(1);
37
32
}
38
33
}
39
34
prevTime = curTime;
@@ -42,11 +37,8 @@ void looper() {
42
37
timesTooSoon++;
43
38
if (timesTooSoon >= 2) {
44
39
printf("Abort: With swap interval of 4, we should be running at most 15fps! (or 30fps on 120Hz displays) but seems like swap control is not working and we are running at 60fps!\n");
0 commit comments