I have a strange phenomenon that occurs on my Windows 2K PC, but not on the Windows XP one.
Both use MS VS Studio .Net to build. All operating systems have the latest service packs, etc..
When I run any program built using DarkSDK, my screen saver assignment disappears. By this I mean, after the program runs, checking the properties for the desktop shows that the screen saver selected is 'none'.
I have tested this repeatedly with the simplest of programs, both in windowed and non-windowed mode.
Here is some sample code (with a variation of a routine I use for text display which keeps memory clean):
#include "DarkSDK.h"
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
void doDbTextXYNoInc(int x,int yloc,const char* format,...)
{
char szTxt[1024];
va_list marker;
// initialise variable arguments
va_start(marker,format);
// build local string
vsprintf(szTxt,format,marker);
// close it off
va_end(marker);
// write it out
dbText(x,yloc,szTxt);
}
void DarkSDK()
{
int fps;
// turn on synchronisation and set rate
dbSyncOn ();
dbSyncRate(60);
dbSetWindowOff();
// set color
dbInk(dbRgb(255,255,0),dbRgb(255,255,255));
while (LoopSDK())
{
if (dbEscapeKey()) break;
dbCLS();
fps=dbScreenFPS();
doDbTextXYNoInc(10,10,"FPS=%d",fps);
dbSync();
}
}
Has anyone else run into something like this? Or knows the reason and/or fix?
Cheers,
Ancient Lady