Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 133594 Details for
Bug 196013
PATCH: games-puzzle/tong, reduce CPU usage
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to limit fps to 22.2
limitfps.patch (text/plain), 670 bytes, created by
Rudi Lippert
on 2007-10-16 06:48:30 UTC
(
hide
)
Description:
Patch to limit fps to 22.2
Filename:
MIME Type:
Creator:
Rudi Lippert
Created:
2007-10-16 06:48:30 UTC
Size:
670 bytes
patch
obsolete
>--- tong.cpp.ori 2007-10-15 19:27:54.000000000 +0200 >+++ tong.cpp 2007-10-15 19:36:51.000000000 +0200 >@@ -54,6 +54,8 @@ > #define MENUMOUSE_THRESHOLD 40 > #define DEMO_TIME 8000 > >+#define MIN_TIME 45 >+ > bool drop_piece(Tetrad*, Tetrad*, Bucket*, Uint32&, bool&, bool&, Option*, > int&); > >@@ -1979,6 +1981,13 @@ > SDL_Flip(screen); > lastlastupdate=lastupdate; > lastupdate=SDL_GetTicks(); >+ >+ // limit to 1000/MIN_TIME fps >+ if (lastupdate-lastlastupdate < MIN_TIME) { >+ SDL_Delay(MIN_TIME - (lastupdate - lastlastupdate)); >+ } >+ lastupdate = SDL_GetTicks(); >+ > } //main game loop > > if(Mix_PlayingMusic()) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 196013
: 133594 |
133595