From b210b6193f8fe4b969e6f48a2dc892bfca45d580 Mon Sep 17 00:00:00 2001 From: marcobarilari Date: Wed, 15 Jul 2020 22:44:41 +0200 Subject: [PATCH 1/4] update how PTB opens a window to the easiest way --- initPTB.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/initPTB.m b/initPTB.m index 5a1e7c8..28947dd 100644 --- a/initPTB.m +++ b/initPTB.m @@ -76,17 +76,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 From a0835832b41b2edb62161aadb613d25d812b6b23 Mon Sep 17 00:00:00 2001 From: marcobarilari Date: Thu, 16 Jul 2020 11:26:02 +0200 Subject: [PATCH 2/4] delete some code related to `PsychImaging` --- initPTB.m | 4 ---- 1 file changed, 4 deletions(-) diff --git a/initPTB.m b/initPTB.m index 28947dd..925e4c5 100644 --- a/initPTB.m +++ b/initPTB.m @@ -63,10 +63,6 @@ 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'); - % init PTB with different options in concordance to the Debug Parameters if cfg.debug From 7d8bc9d6816b7a3cdc877bb24dda5077c5e280a1 Mon Sep 17 00:00:00 2001 From: marcobarilari Date: Thu, 16 Jul 2020 11:44:50 +0200 Subject: [PATCH 3/4] fix comment style --- initPTB.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/initPTB.m b/initPTB.m index 925e4c5..2292b4f 100644 --- a/initPTB.m +++ b/initPTB.m @@ -63,10 +63,10 @@ cfg.screen = max(Screen('Screens')); % Main screen -% init PTB with different options in concordance to the Debug Parameters +% Init PTB with different options in concordance to the Debug Parameters if cfg.debug - % set to one because we don not care about time + % Set to one because we don not care about time Screen('Preference', 'SkipSyncTests', 2); Screen('Preference', 'Verbosity', 0); Screen('Preferences', 'SuppressAllWarnings', 2); @@ -87,7 +87,7 @@ end -% window size info +% Get the size of the on screen window [cfg.winWidth, cfg.winHeight] = WindowSize(cfg.win); From 167acf75bd9c33a76c5c978f6ecb692c93606fd2 Mon Sep 17 00:00:00 2001 From: marcobarilari Date: Thu, 16 Jul 2020 11:49:24 +0200 Subject: [PATCH 4/4] small comments updates --- initPTB.m | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/initPTB.m b/initPTB.m index 2292b4f..8508bf6 100644 --- a/initPTB.m +++ b/initPTB.m @@ -61,12 +61,13 @@ %% Visual -cfg.screen = max(Screen('Screens')); % Main screen +% 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 +% init PTB with different options in concordance to the Debug Parameters if cfg.debug - % Set to one because we don not care about time + % set to one because we don not care about time Screen('Preference', 'SkipSyncTests', 2); Screen('Preference', 'Verbosity', 0); Screen('Preferences', 'SuppressAllWarnings', 2); @@ -87,7 +88,7 @@ end -% Get the size of the on screen window +% window size info [cfg.winWidth, cfg.winHeight] = WindowSize(cfg.win);