Text this: Operation of a single-photon-counting x-ray charge-coupled device camera spectrometer in a petawatt environment