LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

Break on...

Root / Programming Questions / [.]

🔒
Retrogamer123Created:
What does it mean when the program says: Break on line 35.with line 35 being Vsync 1?

"Break On" means the user stopped the program there. It's not an error so much as "we were here when we stopped" since most everything else is almost instantaneous from our perspective, it'll often list a timing line (e.g. VSYNC) as being the break line simply because you're on it for more time than the others.

Buttons are only registered each frame, so the select and start buttons can only stop a program once a frame registers them. Since vsync 1 forces at most 1 frame to pass before continuing, it is where perfect 60fps programs tend to break at.

Just a quick, slightly off topic question: Should VSYNC go at the end or the beginning of a loop?

I normally put it at the end, but as long as it's sandwiched between display commands and display clearing, it should be fine.

I put VSYNC immediately before checking the inputs, so that I have the input information available to me as soon as possible (yes even though it's only microseconds difference). I make the outputs (redraw, sound, etc.) immediately after the inputs, because there's no point wasting time after getting the input information before acting on that information. That puts the loop after the outputs are drawn and before the VSYNC.