~ubuntu-branches/ubuntu/trusty/psychtoolbox-3/trusty-proposed

« back to all changes in this revision

Viewing changes to Psychtoolbox/PsychObsolete/IsWinMatlabR11Style.m

  • Committer: Package Import Robot
  • Author(s): Yaroslav Halchenko
  • Date: 2013-11-19 23:34:50 UTC
  • mfrom: (3.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20131119233450-f7nf92vb8qavjmk8
Tags: 3.0.11.20131017.dfsg1-3
Upload to unsable since fresh glew has arrived to sid!

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function resultFlag = IsWinMatlabR11Style
 
2
% resultFlag = IsWinMatlabR11Style
 
3
%
 
4
% Return true if Psychtoolbox is running on Microsoft Windows,
 
5
% with a Matlab version older than R2007a, i.e. using MEX files that
 
6
% are compiled against Matlab R11.
 
7
 
8
% See also: IsOSX, IsLinux, IsOS9, IsWin, OSName, computer
 
9
 
 
10
% HISTORY
 
11
% 1/03/10 mk    Wrote it.
 
12
 
 
13
persistent rc;
 
14
 
 
15
if isempty(rc)
 
16
    % Running on Windows, but not on Octave (ie., on Matlab) and the Screen
 
17
    % mex file has a .dll extension? If so we're on a R11 based system:
 
18
    if IsWin & ~IsOctave & ~isempty(findstr(which('Screen'), 'Screen.dll')) %#ok<AND2>
 
19
        rc = 1;
 
20
    else
 
21
        rc = 0;
 
22
    end
 
23
end;
 
24
resultFlag = rc;