Fix T51998: Anim player uses 100% CPU
The loop running with no events didn't sleep. Now wait for events when paused.
This commit is contained in:
parent
2c10e8a3cf
commit
910ab14145
Notes:
blender-bot
2023-04-19 22:54:54 +02:00
Referenced by issue #51998, Animation Player code loop
|
@ -1428,8 +1428,7 @@ static char *wm_main_playanim_intern(int argc, const char **argv)
|
|||
|
||||
ps.next_frame = ps.direction;
|
||||
|
||||
|
||||
while ((hasevent = GHOST_ProcessEvents(g_WS.ghost_system, 0)) || ps.wait2) {
|
||||
while ((hasevent = GHOST_ProcessEvents(g_WS.ghost_system, ps.wait2d))) {
|
||||
if (hasevent) {
|
||||
GHOST_DispatchEvents(g_WS.ghost_system);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue