Simplest approach is to take your donut.exe
and rename it to donut.scr
.
Next you click on donut.scr
with second mouse button, and select Install
.
Done.
Now Donut is set as your windows screen saver. Windows will turn it on after sometime of inactivity.
Screensaver is just an exe file. But it should handle few extra command line arguments to work correctly.
However if you ignore that, windows will still start it like it would start screensaver.
Windows will probably not shut it down once you move your mouse. So you will need to click "x" on it every time you come back to your computer.
It's up to screensaver to turn it self off once mouse is moved or key on keyboard is pressed.
And that console window will start every time you will go to screensaver settings, instead of being shown in preview.
But it will work, and give you starting point.
If you want to go step further you can check main arguments for special commands.
\s
= normal screensaver start after timeout.
\c
= show settings window. If you have.
= same as \c
\p 123
= preview window inside settings. For start you can just exit and don't display preview.
If you want go even further you can create fullscreen window using winapi.
Render things using DirectX or OpenGL. And exit once mouse is moved or key pressed.