Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions initPTB.m
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,8 @@

%% Visual

cfg.screen = max(Screen('Screens')); % Main screen

% Open a fullscreen, onscreen window with gray background. Enable 32bpc
% floating point framebuffer via imaging pipeline on it.
PsychImaging('PrepareConfiguration');
% Get the screen numbers and draw to the external screen if avaliable
cfg.screen = max(Screen('Screens'));

% init PTB with different options in concordance to the Debug Parameters
if cfg.debug
Expand All @@ -76,17 +73,17 @@
Screen('Preferences', 'SuppressAllWarnings', 2);

if cfg.testingSmallScreen
[cfg.win, cfg.winRect] = PsychImaging('OpenWindow', cfg.screen, cfg.backgroundColor, [0,0, 480, 270]);
[cfg.win, cfg.winRect] = Screen('OpenWindow', cfg.screen, cfg.backgroundColor, [0,0, 480, 270]);
else
if cfg.testingTranspScreen
PsychDebugWindowConfiguration
end
[cfg.win, cfg.winRect] = PsychImaging('OpenWindow', cfg.screen, cfg.backgroundColor);
[cfg.win, cfg.winRect] = Screen('OpenWindow', cfg.screen, cfg.backgroundColor);
end

else
Screen('Preference','SkipSyncTests', 0);
[cfg.win, cfg.winRect] = PsychImaging('OpenWindow', cfg.screen, cfg.backgroundColor);
[cfg.win, cfg.winRect] = Screen('OpenWindow', cfg.screen, cfg.backgroundColor);

end

Expand Down