Bug#866378: 3dchess: 100 % CPU consumption
Fabian Greffrath
fabian at debian.org
Thu Jun 29 19:24:14 UTC 2017
control: tags -1 +patch
Am Donnerstag, den 29.06.2017, 12:04 +0100 schrieb James Cowgill:
> It looks to me like the game loop has no sleeps or other waiting in
> it.
> It has probably always consumed 100% CPU.
Good catch! I have simply added a usleep(10) call in the main loop,
effectively capping the game at about 100 FPS, and it settled at around
4% CPU consumption:
--- 3dchess-0.8.1.orig/src/main.c
+++ 3dchess-0.8.1/src/main.c
@@ -201,6 +201,7 @@ DoMain3DcLoop(void)
XtDispatchEvent(&event);
}
+ usleep(10);
} /* End game loop */
return;
Cheers,
- Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20170629/34c114ae/attachment.sig>
More information about the Pkg-games-devel
mailing list