Skip to content

Commit 46674f1

Browse files
Merge pull request #3 from cpp-lln-lab/master
update origin
2 parents fa8661c + 81521c0 commit 46674f1

File tree

4 files changed

+21
-18
lines changed

4 files changed

+21
-18
lines changed

.all-contributorsrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@
2626
"design",
2727
"doc"
2828
]
29+
},
30+
{
31+
"login": "CerenB",
32+
"name": "CerenB",
33+
"avatar_url": "https://avatars1.githubusercontent.com/u/10451654?v=4",
34+
"profile": "https://github.com/CerenB",
35+
"contributions": [
36+
"code",
37+
"design",
38+
"doc",
39+
"review"
40+
]
2941
}
3042
],
3143
"contributorsPerLine": 7,

CPP_getResponseDemo.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@
8787

8888

8989
% Check what keys were pressed (all of them)
90-
responseEvents = getResponse('check', cfg, expParameters, 0, 1);
90+
responseEvents = getResponse('check', cfg, expParameters, 0);
9191

9292
% The following line would only return key presses and not releases
93-
% responseEvents = getResponse('check', cfg, expParameters, 1 , 1);
93+
% responseEvents = getResponse('check', cfg, expParameters, 1);
9494

9595
% This can be used to flush the queue: empty all events that are still present in the queue
9696
getResponse('flush', cfg, expParameters, 1);

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
# CPP_PTB
22

33
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
4-
5-
[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)
6-
4+
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
75
<!-- ALL-CONTRIBUTORS-BADGE:END -->
86

97
This is List of Crossmodal Perception and Plasticity lab (CPP) PsychToolBox (PTB) toolbox.
@@ -145,22 +143,18 @@ Use that to stop your script and only restart when the space bar is pressed.
145143
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
146144

147145
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
148-
149146
<!-- prettier-ignore-start -->
150-
151147
<!-- markdownlint-disable -->
152-
153148
<table>
154149
<tr>
155150
<td align="center"><a href="https://remi-gau.github.io/"><img src="https://avatars3.githubusercontent.com/u/6961185?v=4" width="100px;" alt=""/><br /><sub><b>Remi Gau</b></sub></a><br /><a href="https://github.com/cpp-lln-lab/CPP_PTB/commits?author=Remi-Gau" title="Code">💻</a> <a href="#design-Remi-Gau" title="Design">🎨</a> <a href="https://github.com/cpp-lln-lab/CPP_PTB/commits?author=Remi-Gau" title="Documentation">📖</a></td>
156151
<td align="center"><a href="https://github.com/marcobarilari"><img src="https://avatars3.githubusercontent.com/u/38101692?v=4" width="100px;" alt=""/><br /><sub><b>marcobarilari</b></sub></a><br /><a href="https://github.com/cpp-lln-lab/CPP_PTB/commits?author=marcobarilari" title="Code">💻</a> <a href="#design-marcobarilari" title="Design">🎨</a> <a href="https://github.com/cpp-lln-lab/CPP_PTB/commits?author=marcobarilari" title="Documentation">📖</a></td>
152+
<td align="center"><a href="https://github.com/CerenB"><img src="https://avatars1.githubusercontent.com/u/10451654?v=4" width="100px;" alt=""/><br /><sub><b>CerenB</b></sub></a><br /><a href="https://github.com/cpp-lln-lab/CPP_PTB/commits?author=CerenB" title="Code">💻</a> <a href="#design-CerenB" title="Design">🎨</a> <a href="https://github.com/cpp-lln-lab/CPP_PTB/commits?author=CerenB" title="Documentation">📖</a> <a href="https://github.com/cpp-lln-lab/CPP_PTB/pulls?q=is%3Apr+reviewed-by%3ACerenB" title="Reviewed Pull Requests">👀</a></td>
157153
</tr>
158154
</table>
159155

160156
<!-- markdownlint-enable -->
161-
162157
<!-- prettier-ignore-end -->
163-
164158
<!-- ALL-CONTRIBUTORS-LIST:END -->
165159

166160
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

initPTB.m

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,8 @@
6161

6262
%% Visual
6363

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

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

7875
if cfg.testingSmallScreen
79-
[cfg.win, cfg.winRect] = PsychImaging('OpenWindow', cfg.screen, cfg.backgroundColor, [0,0, 480, 270]);
76+
[cfg.win, cfg.winRect] = Screen('OpenWindow', cfg.screen, cfg.backgroundColor, [0,0, 480, 270]);
8077
else
8178
if cfg.testingTranspScreen
8279
PsychDebugWindowConfiguration
8380
end
84-
[cfg.win, cfg.winRect] = PsychImaging('OpenWindow', cfg.screen, cfg.backgroundColor);
81+
[cfg.win, cfg.winRect] = Screen('OpenWindow', cfg.screen, cfg.backgroundColor);
8582
end
8683

8784
else
8885
Screen('Preference','SkipSyncTests', 0);
89-
[cfg.win, cfg.winRect] = PsychImaging('OpenWindow', cfg.screen, cfg.backgroundColor);
86+
[cfg.win, cfg.winRect] = Screen('OpenWindow', cfg.screen, cfg.backgroundColor);
9087

9188
end
9289

0 commit comments

Comments
 (0)