Original Post
I have a (fairly) simple program (in C++ 6, and for windows xp) which opens a text file, chooses a filename for a picture, and then displays that picture for a certain amount of time before choosing the next one. I''m using DirectX for the displaying of it so that I could put in 3d effects for fading in/out, etc. The thing is that I built it to be in either windowed mode or fullscreen mode so that I can have it displaying on one monitor while I work on the other (So that the monitor is actually doing something when I''m not using it). The problem is that when I''m working without the program on my progs use ~20% of my processor, but when I run the program it takes 100% of my processor and my mouse starts skipping and other things start to lag. How would I reduce this processor usage? I''ve put in a check to make sure that it only displays so many frames per second but it still takes all of my processor. Anyone have any ideas? (As a workaround for me I reduce the process''s priority, but I''d rather it be something the program itself does.)
I''m also toying with the Sleep() command, but I don''t want to use that because it disrupts the input stream (which is based on keystates at the time of a frame, not on windows messages)