Project

General

Profile

Bug #3943

CPU/GPU usage should stop when the game is minimised

Added by mitten mitten 3 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Category:
SDL
Target version:
Start date:
07/01/2017
% Done:

100%

Reproducibility:
Always
Operating system:
Windows
Severity:
Normal

Description

OpenMW 0.41, Windows 10 x64

OpenMW uses a lot of CPU while I play. I understand fixing something like that is already on your radar. But in the meantime it would be nice if OpenMW stopped using the CPU while it's minimised. It uses like 100% of one core, 50% of another core, then a bit of 3 more cores, regardless of whether it's in the foreground or in the background. That's a lot of heat unexpected from something that's minimised.

GPU usage doesn't stop either when I minimise the game but it's not that high.

Associated revisions

Revision 8feb495d
Added by scrawl . 2 months ago

Merge pull request #1340 from PlutonicOverkill/pause-when-minimised

Pause game when minimised on Windows (Bug #3943)

History

#1 Updated by scrawl . 2 months ago

uses a lot of CPU while I play

By default, the game renders as many frames as it can. You can add framelimit or vsync to your settings if you want.

On Linux, I get 0% CPU/GPU usage when the game window is minimized. Maybe there is a Windows specific bug? Can someone else confirm it?

#2 Updated by Andrei Kortunov 2 months ago

Can someone else confirm it?

I managed to achieve this behaviour on Linux only with

minimize on focus loss = false

Maybe reporters's game is not minimized for some reason.

#3 Updated by Plutonic Overkill 2 months ago

Can confirm on Windows 10 x64. Tested in both windowed and fullscreen and the game continues running if you minimise it. You can still hear sound effects from NPCs, creatures etc. in the background if not in a menu or inventory screen.

#4 Updated by Plutonic Overkill 2 months ago

The problem seems to be related to different SDL events being sent on Windows than on Linux or other platforms. I haven't thoroughly tested it yet, but this commit seems to have done the trick.

#5 Updated by mitten mitten 2 months ago

Thank you, that will be useful.

In any case the CPU usage of this game is simply too high. It would be appreciated if you could do something about it.

#6 Updated by Andrei Kortunov about 1 month ago

  • Category set to SDL
  • Status changed from New to Closed
  • Assignee set to Plutonic Overkill
  • Target version set to openmw-0.43
  • % Done changed from 0 to 100

Also available in: Atom PDF