[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/games/kolf-ng
From:       Stefan Majewsky <majewsky () gmx ! net>
Date:       2009-08-13 9:06:14
Message-ID: 1250154374.792303.8484.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1010700 by majewsky:

Reduce CPU usage of Kolf by abou 98% while in games (passed the wrong variable to a \
QTimer::start).

 M  +1 -0      CMakeLists.txt  
 M  +1 -1      elements/physicsengine.cpp  


--- trunk/playground/games/kolf-ng/CMakeLists.txt #1010699:1010700
@@ -96,6 +96,7 @@
 )
 
 kde4_add_executable(kolf-ng ${kolfng_SRCS})
+SET_TARGET_PROPERTIES(kolf-ng PROPERTIES COMPILE_FLAGS "-pg" LINK_FLAGS "-pg")
 target_link_libraries(kolf-ng ${KDE4_KDEUI_LIBS} ${KDEGAMES_LIBRARY} \
${ODE_LIBRARIES} ${KOLF2_EXTRA_LINK_LIBS})  # Reminder: Change ${KDEGAMES_LIBRARY} to \
"kdegames" when moving to kdegames module.  
--- trunk/playground/games/kolf-ng/elements/physicsengine.cpp #1010699:1010700
@@ -54,7 +54,7 @@
 void Kolf::PhysicsEngine::startSimulation()
 {
 	if (m_timerID == -1)
-		m_timerID = startTimer(MillisecondsPerStep);
+		m_timerID = startTimer(MillisecondsPerFrame);
 }
 
 void Kolf::PhysicsEngine::stopSimulation()


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic