Adaptive optics can be used to improve the performance of optical wireless communications links degraded by atmospheric turbulence. Accurate wavefront sensing is necessary for some adaptive optics systems to compensate for the effects of atmospheric turbulence. Although the Shack-Hartmann sensor can provide accurate wavefront sensing under controlled conditions, scintillation can restrict the performance of Shack-Hartmann wavefront sensing by creating large intensity fluctuations. These intensity fluctuations can create errors in the wavefront measurement if the intensity dynamic range of the Shack-Hartmann sensor is exceeded. The results of computer simulations which model the performance of the Shack-Hartmann wavefront sensor are presented. Specifically it is shown that the intensity dynamic range of the Shack-Hartmann wavefront sensor can be increased by operating with saturated pixels without an increase in error in the measured wavefront. Operating conditions that maximize the intensity dynamic range of the Shack-Hartmann sensor are presented. Experimental results are presented which support the results of the computer simulation.