Skip to content

Commit cb5b15a

Browse files
committed
make initPTB collect info about OS and versions
1 parent ae71995 commit cb5b15a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

initPTB.m renamed to src/initPTB.m

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
%
2222

2323
checkPtbVersion();
24+
25+
cfg = getOsInfo(cfg);
2426

2527
pth = fileparts(mfilename('fullpath'));
2628
addpath(genpath(fullfile(pth, 'src')));
@@ -85,6 +87,27 @@
8587

8688
end
8789

90+
function cfg = getOsInfo(cfg)
91+
92+
cfg.software.os = computer();
93+
cfg.software.name = 'Psychtoolbox';
94+
cfg.software.RRID = 'SCR_002881';
95+
96+
[~, versionStruc] = PsychtoolboxVersion;
97+
98+
cfg.software.version = sprintf('%i.%i.%i', ...
99+
versionStruc.major, ...
100+
versionStruc.minor, ...
101+
versionStruc.point);
102+
103+
runsOn = 'Matlab - ';
104+
if IsOctave
105+
runsOn = 'Octave - ';
106+
end
107+
cfg.software.runsOn = [runsOn version()];
108+
109+
end
110+
88111
function initDebug(cfg)
89112

90113
% init PTB with different options in concordance to the debug Parameters

0 commit comments

Comments
 (0)