Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Printing fps to screen

Author
Message
kynian
12
Years of Service
User Offline
Joined: 1st Sep 2011
Location:
Posted: 19th Dec 2011 04:49
Hello, Im trying to get my game to print the fps to the bottom right of the screen, and Ive been using this code to do so:




it works fine, it displays the fps right where I want it but when I close the program it says:

Quote: "A buffer overrun has occurred in ld22.exe which has corrupted the program's internal state. Press Break to debug the program or Continue to terminate the program.

For more details please see Help topic 'How to debug Buffer Overrun Issues'."



can anyone tell me why this is happening?
Mr Bigglesworth
16
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 19th Dec 2011 07:41 Edited at: 19th Dec 2011 07:42
I think it has to do with strcpy causing memory leaks. This is what I use:



I is a nifty function. It can handle all numerical text output and deletes the dbStr to prevent memory leaks and buffer overflows. I use it all the time with no problems.

Use:

vitinho444
13
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 19th Dec 2011 16:33
I used that function to turn a int to a char and then display it, but i remmember that it stays at FPS 60 all tha time =D

I think the overrun buffer error doesn't appear on release (not sure)

C++ Medium 3.5/5
VB6 Advanced: 4/5
VB.NET Advanced: 4/5
Mr Bigglesworth
16
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 19th Dec 2011 17:42
Quote: "I used that function to turn a int to a char and then display it, but i remmember that it stays at FPS 60 all tha time =D"


It works fine for me
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 19th Dec 2011 22:55 Edited at: 19th Dec 2011 22:56
Quote: "Quote: "I used that function to turn a int to a char and then display it, but i remmember that it stays at FPS 60 all tha time =D"

It works fine for me "


I think he might have VSYNC Override turned on in his GPU settings...

EDIT

GPU

Login to post a reply

Server time is: 2024-04-20 05:36:47
Your offset time is: 2024-04-20 05:36:47