Skip to content

Commit 52e7d05

Browse files
committed
remove magnifying aperture to fill whole screen width
- easier to change the screen resolution
1 parent 14fe7a4 commit 52e7d05

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

src/aperture/apertureTexture.m

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
Screen('DrawTexture', cfg.screen.win, cfg.aperture.texture, ...
124124
cfg.screen.winRect, ...
125125
CenterRect( ...
126-
cfg.screen.winRect * cfg.magnify.scalingFactor, ...
126+
cfg.screen.winRect, ...
127127
cfg.screen.winRect), ...
128128
thisEvent.condition - 90);
129129
else
@@ -169,27 +169,14 @@
169169

170170
case 'bar'
171171

172-
EXTRAPOSITION = 0;
173-
if cfg.magnify.do
174-
% we add some extra bar positions that we remove afterwards to
175-
% prevent having nothing on screen for a long time
176-
EXTRAPOSITION = 10;
177-
end
178-
179172
% Set parameters drifting bars
180-
cfg.aperture.barWidthPix = cfg.stimRect(3) / (cfg.volsPerCycle + EXTRAPOSITION);
173+
cfg.aperture.barWidthPix = cfg.stimRect(3) / cfg.volsPerCycle;
181174

182175
barPosPix = ...
183176
[0:cfg.aperture.barWidthPix:cfg.stimRect(3) - cfg.aperture.barWidthPix] + ...
184177
(cfg.screen.winRect(3) / 2 - cfg.stimRect(3) / 2) + ...
185178
cfg.aperture.barWidthPix / 2; %#ok<NBRAK>
186179

187-
% Those positions are removed because they are actually outside of
188-
% the screen when magnification (fit to windows width) is on
189-
if cfg.magnify.do
190-
barPosPix([1:5, end - 4:end]) = [];
191-
end
192-
193180
cfg.aperture.barPosPix = barPosPix;
194181

195182
% Width of bar in degrees of VA (needed for saving)

0 commit comments

Comments
 (0)