Quote:
If I try DEBUG_VAR(on_esc,40); I get a number 207856.813

That's fine because we now know your on_esc pointer gets not overwritten/ set to NULL.
The problem apparently is your keyboard or some other hardware/ driver issue. Have you tried to execute your code on some other PC (for example as an executable)?


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends