Skip to content

Commit

Permalink
Screen/Linux/X11: Add braces for NetWM reporting to make compiler hap…
Browse files Browse the repository at this point in the history
…pier.

Lack of braces should imho not be a problem, and wasn't in the Octave
builds of Screen.mex, but the build for Matlab has a weird problem, in
which the "PTB-INFO: ..." lines about the used flip timestamping mechanism
are not printed! No clue why, looks almost like some compiler bug, but I
accidentally found this today, so fix it.
  • Loading branch information
kleinerm committed Sep 15, 2024
1 parent e5785fc commit 5664981
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions PsychSourceGL/Source/Common/Screen/PsychWindowSupport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1595,8 +1595,9 @@ psych_bool PsychOpenOnscreenWindow(PsychScreenSettingsType *screenSettings, Psyc
printf("PTB-INFO: Measured monitor refresh interval from beamposition = %f ms [%f Hz].\n", ifi_beamestimate * 1000, 1/ifi_beamestimate);

#if (PSYCH_SYSTEM == PSYCH_LINUX) && !defined(PTB_USE_WAFFLE)
if ((PsychPrefStateGet_VBLTimestampingMode()==4) && PsychOSX11ClientCompositorSyncEnabled(*windowRecord))
if ((PsychPrefStateGet_VBLTimestampingMode()==4) && PsychOSX11ClientCompositorSyncEnabled(*windowRecord)) {
printf("PTB-INFO: Will try to use OS-Builtin experimental NetWM compositor timing for accurate Flip timestamping.\n");
}
else
#endif
if ((PsychPrefStateGet_VBLTimestampingMode()==4) && !((*windowRecord)->specialflags & kPsychOpenMLDefective)) {
Expand All @@ -1622,8 +1623,9 @@ psych_bool PsychOpenOnscreenWindow(PsychScreenSettingsType *screenSettings, Psyc
}
else {
#if (PSYCH_SYSTEM == PSYCH_LINUX) && !defined(PTB_USE_WAFFLE)
if ((PsychPrefStateGet_VBLTimestampingMode()==4) && PsychOSX11ClientCompositorSyncEnabled(*windowRecord))
if ((PsychPrefStateGet_VBLTimestampingMode()==4) && PsychOSX11ClientCompositorSyncEnabled(*windowRecord)) {
printf("PTB-INFO: Will try to use OS-Builtin experimental NetWM compositor timing for accurate Flip timestamping.\n");
}
else
#endif
if ((PsychPrefStateGet_VBLTimestampingMode()==4) &&
Expand Down

0 comments on commit 5664981

Please sign in to comment.