Slick Forums

Discuss the Slick 2D Library
It is currently Fri May 24, 2013 4:32 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu Jan 22, 2009 6:13 am 
Offline
Game Developer
User avatar

Joined: Sun May 25, 2008 9:45 am
Posts: 578
When my game is the active window the CPU usage is ~50%. When the window is not focused, CPU usage is 99%. My target frame rate is 200, but since the window is not focused Display.sync is never called. Suggestion: move Display.sync out of "if (hasFocus() || getAlwaysRender())". This change makes CPU usage ~13% when the window is not focused.

_________________
SingSong Karaoke - http://singthegame.com


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 22, 2009 10:28 am 
Offline
User avatar

Joined: Sat Jan 10, 2009 11:51 am
Posts: 5
Location: Finland
Yeah this is pretty annoying. Happening for me too.

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 22, 2009 11:11 am 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
Fixed in SVN.

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 22, 2009 11:20 am 
Offline
User avatar

Joined: Sat Jan 10, 2009 11:51 am
Posts: 5
Location: Finland
Thats good. No more hammering of CPU while the window is not focused :)

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group