The German tennis star agreed to a settlement with his ex-girlfriend, involving a €200,000 payment to the state and charities, just hours before his semifinal victory.