It was white's move and there wasn't a legal move on the board. That is the definition of stalemate.
Instead of Kf8, Qc7/d7 would have been mate.