MATLAB Programming/Psychtoolbox/Screen Commands/Preference

Usage:

boolean=Screen('Preference','Backgrounding')
oldBoolean=Screen('Preference','IgnoreCase',[boolean])
psychTableVersion=Screen('Preference','PsychTableVersion')
mexFunctionName=Screen('Preference','PsychTableCreator')
oldPriority=Screen(windowPtrOrScreenNumber,'Preference','MaxPriorityForBlankingInterrupt',priority)
oldBoolean=Screen(windowPtrOrScreenNumber,'Preference','WaitBlankingUsesInterrupt',[boolean])
bits=Screen(windowPtrOrScreenNumber,'Preference','ClutDacSize')
boolean=Screen(windowPtrOrScreenNumber,'Preference','FixedClut')
oldBoolean=Screen(windowPtrOrScreenNumber,'Preference','SetClutDriverWaitsForBlanking',[boolean])
oldBoolean=Screen(windowPtrOrScreenNumber,'Preference','SetClutQuickly',[boolean])
oldBoolean=Screen(windowPtrOrScreenNumber,'Preference','SetClutCallsWaitBlanking',[boolean])
oldFrames=Screen(windowPtrOrScreenNumber,'Preference','SetClutSimulatesBlankingInterrupts',[frames])

Get/set various preferences. The first four are general, the rest are related to WaitBlanking or SetClut and are screen-specific. boolean values are 1 (nonzero) for Yes and 0 for No. Preferences are volatile: They're set by SCREEN when you first use each screen, and they're flushed by closing the last SCREEN window (e.g. by Psychtoolbox:Screen Commands:Close, Psychtoolbox:Screen Commands:CloseAll, or flushing SCREEN.mex by typing clear screen). So do any preference setting after calling 'OpenWindow'.

Warning: These settings allow you to access all the internal parameters that determine SCREEN's behavior. As a result the set of parameters is ever-changing, as SCREEN evolves to deal with an ever-changing environment (e.g. video drivers that don't wait for blanking, and Rush's high priority).

Feel free to play with these expert controls, but, if you do, realize that you may have to tweak your 'Preference' calls with each new release of the PsychToolbox.

  • SetClutDriverWaitsForBlanking reports whether the monitor's video driver waits for blanking. Usually read-only, you can also set/clear this on the PowerMac 7300/7500/7600/8500/8600 built-in driver.
  • SetClutQuickly specifies your preference for whether to use a custom SetEntriesQuickly.c driver (if available for this device) in place of the standard video driver. The SetEntriesQuickly drivers don't wait for blanking.
  • SetClutCallsWaitBlanking determines whether WaitBlanking should be called after each call to SetClut.
  • SetClutSimulatesBlankingInterrupts sets/gets the number of blanking interrupts to simulate after each SetClut, to make up for interrupts missed during the SetClut call.
  • WaitBlankingUsesInterrupt specifies a preference for whether WaitBlanking should use SetClut (original driver) or the screen's blanking interrupt to wait for blanking. See 'WaitBlanking'.
  • MaxPriorityForBlankingInterrupt specifies the maximum priority at which the hardware blanking interrupt still works. Normally this is 1, but it's reduced to 0.5 (on non-PCI Macs) if necessary for timing the 3-ms interval during which spurious VBL interrupts are ignored. Your programs can override this setting, but your computer is likely to hang unless you really know what you're doing.