Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Kale
PureBasic Expert
Posts: 3000 Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:
Post
by Kale » Tue Apr 11, 2006 5:49 pm
If you look at the manual for the FlipBuffers() command, it now takes a parameter. This parameter can have a value of:
0 : disable synchronization
1 : enable synchronization (default value)
2 : enable synchronization, with a CPU saver routine when the program doesn't consume all the CPU time (full screen mode only)
Have you forgotten constants for these?
Code: Select all
#PB_Disable_Sync
#PB_Enable_Sync
#PB_Enable_Sync_SaveCPU
--Kale
va!n
Addict
Posts: 1104 Joined: Wed Apr 20, 2005 12:48 pm
Post
by va!n » Wed Apr 12, 2006 12:01 am
i like using parameter like 0,1,2 must more instead typing any constant ^^
va!n aka Thorsten
Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Tranquil
Addict
Posts: 952 Joined: Mon Apr 28, 2003 2:22 pm
Location: Europe
Post
by Tranquil » Wed Apr 12, 2006 12:46 am
Kale wrote: If you look at the manual for the FlipBuffers() command, it now takes a parameter. This parameter can have a value of:
0 : disable synchronization
1 : enable synchronization (default value)
2 : enable synchronization, with a CPU saver routine when the program doesn't consume all the CPU time (full screen mode only)
Have you forgotten constants for these?
Code: Select all
#PB_Disable_Sync
#PB_Enable_Sync
#PB_Enable_Sync_SaveCPU
I agree. For better readability every number should be assigned to a constant.
@MrVain:
If you dont want to use the constant you can use the value as well.
Tranquil
Kale
PureBasic Expert
Posts: 3000 Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:
Post
by Kale » Wed Apr 12, 2006 10:48 am
Joakim Christiansen wrote: Shure it aint like this?
Code: Select all
#PB_Disable_Sync
#PB_Enable_Sync
#PB_SaveCPU
FlipBuffers(#PB_Enable_Sync|#PB_SaveCPU)
Yes that make more sense
--Kale
Dummy
Enthusiast
Posts: 162 Joined: Wed Jun 09, 2004 11:10 am
Location: Germany
Contact:
Post
by Dummy » Wed Apr 12, 2006 12:41 pm
Joakim Christiansen wrote: Shure it aint like this?
Code: Select all
#PB_Disable_Sync
#PB_Enable_Sync
#PB_SaveCPU
FlipBuffers(#PB_Enable_Sync|#PB_SaveCPU)
no
ppl would try this code, but it wouldn't have any effect!
Code: Select all
#PB_Disable_Sync
#PB_Enable_Sync
#PB_SaveCPU
FlipBuffers(#PB_Disable_Sync|#PB_SaveCPU)
Kale
PureBasic Expert
Posts: 3000 Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:
Post
by Kale » Wed Apr 12, 2006 2:18 pm
Dummy wrote: Joakim Christiansen wrote: Shure it aint like this?
Code: Select all
#PB_Disable_Sync
#PB_Enable_Sync
#PB_SaveCPU
FlipBuffers(#PB_Enable_Sync|#PB_SaveCPU)
no
ppl would try this code, but it wouldn't have any effect!
Code: Select all
#PB_Disable_Sync
#PB_Enable_Sync
#PB_SaveCPU
FlipBuffers(#PB_Disable_Sync|#PB_SaveCPU)
Im sure this could be implemented.
--Kale
blueznl
PureBasic Expert
Posts: 6166 Joined: Sat May 17, 2003 11:31 am
Contact:
Post
by blueznl » Wed Apr 12, 2006 2:26 pm
not sure i like the wording
perhaps
pb_sync_enable
pb_sync_disable
pb_sync_savecpu
?
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide
right here ... )
Dare2
Moderator
Posts: 3321 Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land
Post
by Dare2 » Wed Apr 12, 2006 2:32 pm
Yes, that would be a better fit with the other PureBasic constants (#PB_GroupingThing_ActionThing).
@}--`--,-- A rose by any other name ..