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.

DarkBASIC Professional Discussion / Task priority to get some more fps

Author
Message
Alduce
23
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 23rd Apr 2013 11:06
Hi all I am reading another post about task priority and I find this code to get some more frames per seconds:



I am using windows7 without Kernel32 dll but I download it and I put this dll in the project folder.

But I got always the "Could not call DLL function" error.

Can someone help?
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 26th Apr 2013 06:06
Sorry I can't answer your problem directly. However in principle, even though this might give you a tiny gain, it's not a good idea to do this. There are good scenarios for this sort of thing, but in windows game design this is sloppy programming.

Alduce
23
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 26th Apr 2013 10:02
haha yea mate I know you are right. Sometimes desperation/frustration about low framePerSeconds make me making weird triks to obtain 1 or 2 fps more..
Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 26th Apr 2013 13:42
Windows 7 should have the kernel32 dll?
Also, since it is a system library I very much doubt it would work to just drop a copy in your application directory and hope for the best.

You can try to explicitly state the location for the dll as "C:\Windows\SysWOW64\Kernel32.dll" and see if that helps (it most likely defaults to the C:\Windows\System32 directory). Again forcing process priority is usually not that wise but there are other quite useful functions in that dll (sleep for one).


"Why do programmers get Halloween and Christmas mixed up?"

Login to post a reply

Server time is: 2026-07-07 02:39:24
Your offset time is: 2026-07-07 02:39:24