Not sure why but this hack compiled under debug mode never stops drawing. In release mode it stops after a bit.
Just a quick tip for you to investigate further. And it has to be compiled to x86 or else it throws errors even though that shouldn't be related.
Just test it out in debug mode and confirm what I told you