Comment out and refactor some unnecessary (IMO) console startup messages... seems to improve win32 startup times, possibly due to less scrolling of the startup window text buffer.

git-svn-id: https://svn.eduke32.com/eduke32@848 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2008-07-09 23:25:38 +00:00
parent 098c99e3f7
commit 4ddfc3e9d9
18 changed files with 3002 additions and 2985 deletions

View file

@ -56,7 +56,7 @@ static int osdfunc_setrendermode(const osdfuncparm_t *parm)
char *modestrs[] =
{
"classic software", "polygonal flat-shaded software",
"classic software", "completely broken polygonal flat-shaded software",
"polygonal textured software", "polygonal OpenGL", "great justice"
};
@ -106,8 +106,15 @@ int osdcmd_glinfo(const osdfuncparm_t *parm)
initprintf("OpenGL Information:\n"
" Version: %s\n"
" Vendor: %s\n"
" Renderer: %s\n"
" Maximum anisotropy: %.1f%s\n"
" Renderer: %s\n",
glinfo.version,
glinfo.vendor,
glinfo.renderer);
if (!glinfo.dumped)
return OSDCMD_OK;
initprintf(" Maximum anisotropy: %.1f%s\n"
" BGRA textures: %s\n"
" Non-x^2 textures: %s\n"
" Texure compression: %s\n"
@ -123,9 +130,6 @@ int osdcmd_glinfo(const osdfuncparm_t *parm)
" env_combine: %s\n"
" Vertex Buffer Objects: %s\n"
" Extensions:\n",
glinfo.version,
glinfo.vendor,
glinfo.renderer,
glinfo.maxanisotropy, glinfo.maxanisotropy>1.0?"":" (no anisotropic filtering)",
glinfo.bgra ? "supported": "not supported",
glinfo.texnpot ? "supported": "not supported",

View file

@ -522,7 +522,7 @@ int initsystem(void)
{
DEVMODE desktopmode;
initprintf("Initializing Windows DirectX/GDI system interface\n");
// initprintf("Initializing Windows DirectX/GDI system interface\n");
// get the desktop dimensions before anything changes them
ZeroMemory(&desktopmode, sizeof(DEVMODE));
@ -873,9 +873,9 @@ void uninitmouse(void)
grabmouse(0);
moustat=mousegrab=0;
SetEvent(inputevt[MOUSE]);
if (WaitForSingleObject(mousethread, 300) == WAIT_OBJECT_0)
initprintf("DirectInput: Mouse thread has exited\n");
else
if (WaitForSingleObject(mousethread, 300) != WAIT_OBJECT_0)
// initprintf("DirectInput: Mouse thread has exited\n");
// else
initprintf("DirectInput: Mouse thread failed to exit!\n");
}
@ -1194,7 +1194,7 @@ static BOOL InitDirectInput(void)
// load up the DirectInput DLL
if (!hDInputDLL)
{
initprintf(" - Loading DINPUT.DLL\n");
// initprintf(" - Loading DINPUT.DLL\n");
hDInputDLL = LoadLibrary("DINPUT.DLL");
if (!hDInputDLL)
{
@ -1208,7 +1208,7 @@ static BOOL InitDirectInput(void)
if (!aDirectInputCreateA) ShowErrorBox("Error fetching DirectInputCreateA()");
// create a new DirectInput object
initprintf(" - Creating DirectInput object\n");
// initprintf(" - Creating DirectInput object\n");
result = aDirectInputCreateA(hInstance, DIRECTINPUT_VERSION, &lpDI, NULL);
if FAILED(result) { HorribleDInputDeath("DirectInputCreateA() failed", result); }
else if (result != DI_OK) initprintf(" Created DirectInput object with warning: %s\n",GetDInputError(result));
@ -1234,7 +1234,7 @@ static BOOL InitDirectInput(void)
if ((inputdevices & (1<<devn)) == 0) continue;
*devicedef[devn].did = NULL;
initprintf(" - Creating %s device\n", devicedef[devn].name);
// initprintf(" - Creating %s device\n", devicedef[devn].name);
result = IDirectInput_CreateDevice(lpDI, &guidDevs[devn], &dev, NULL);
if FAILED(result) { HorribleDInputDeath("Failed creating device", result); }
else if (result != DI_OK) initprintf(" Created device with warning: %s\n",GetDInputError(result));
@ -1345,7 +1345,7 @@ static void UninitDirectInput(void)
{
if (*devicedef[devn].did)
{
initprintf(" - Releasing %s device\n", devicedef[devn].name);
// initprintf(" - Releasing %s device\n", devicedef[devn].name);
if (devn != JOYSTICK) IDirectInputDevice2_SetEventNotification(*devicedef[devn].did, NULL);
@ -1361,14 +1361,14 @@ static void UninitDirectInput(void)
if (lpDI)
{
initprintf(" - Releasing DirectInput object\n");
// initprintf(" - Releasing DirectInput object\n");
IDirectInput_Release(lpDI);
lpDI = NULL;
}
if (hDInputDLL)
{
initprintf(" - Unloading DINPUT.DLL\n");
// initprintf(" - Unloading DINPUT.DLL\n");
FreeLibrary(hDInputDLL);
hDInputDLL = NULL;
}
@ -2128,8 +2128,9 @@ int setvideomode(int x, int y, int c, int fs)
validmode[validmodecnt].fs=f; \
validmode[validmodecnt].extra=n; \
validmodecnt++; \
initprintf(" - %dx%d %d-bit %s\n", x, y, c, (f&1)?"fullscreen":"windowed"); \
}
/* initprintf(" - %dx%d %d-bit %s\n", x, y, c, (f&1)?"fullscreen":"windowed"); \
} */
#define CHECK(w,h) if ((w < maxx) && (h < maxy))
@ -2228,7 +2229,7 @@ void getvalidmodes(void)
if (modeschecked) return;
validmodecnt=0;
initprintf("Detecting video modes:\n");
// initprintf("Detecting video modes:\n");
if (bDDrawInited)
{
@ -2723,7 +2724,7 @@ static BOOL WINAPI InitDirectDraw_enum(GUID *lpGUID, LPSTR lpDesc, LPSTR lpName,
UNREFERENCED_PARAMETER(lpGUID);
UNREFERENCED_PARAMETER(lpName);
UNREFERENCED_PARAMETER(lpContext);
initprintf(" * %s\n", lpDesc);
// initprintf(" * %s\n", lpDesc);
return 1;
}
@ -2741,7 +2742,7 @@ static BOOL InitDirectDraw(void)
// load up the DirectDraw DLL
if (!hDDrawDLL)
{
initprintf(" - Loading DDRAW.DLL\n");
// initprintf(" - Loading DDRAW.DLL\n");
hDDrawDLL = LoadLibrary("DDRAW.DLL");
if (!hDDrawDLL)
{
@ -2760,7 +2761,7 @@ static BOOL InitDirectDraw(void)
}
// enumerate the devices to make us look fancy
initprintf(" - Enumerating display devices\n");
// initprintf(" - Enumerating display devices\n");
aDirectDrawEnumerate(InitDirectDraw_enum, NULL);
// get the pointer to DirectDrawCreate
@ -2773,7 +2774,7 @@ static BOOL InitDirectDraw(void)
}
// create a new DirectDraw object
initprintf(" - Creating DirectDraw object\n");
// initprintf(" - Creating DirectDraw object\n");
result = aDirectDrawCreate(NULL, &lpDD, NULL);
if (result != DD_OK)
{
@ -2783,7 +2784,7 @@ static BOOL InitDirectDraw(void)
}
// fetch capabilities
initprintf(" - Checking capabilities\n");
// initprintf(" - Checking capabilities\n");
ddcaps.dwSize = sizeof(DDCAPS);
result = IDirectDraw_GetCaps(lpDD, &ddcaps, NULL);
if (result != DD_OK)
@ -2815,14 +2816,14 @@ static void UninitDirectDraw(void)
if (lpDD)
{
initprintf(" - Releasing DirectDraw object\n");
// initprintf(" - Releasing DirectDraw object\n");
IDirectDraw_Release(lpDD);
lpDD = NULL;
}
if (hDDrawDLL)
{
initprintf(" - Unloading DDRAW.DLL\n");
// initprintf(" - Unloading DDRAW.DLL\n");
FreeLibrary(hDDrawDLL);
hDDrawDLL = NULL;
}

View file

@ -781,6 +781,10 @@
RelativePath=".\source\jaudiolib\music.c"
>
</File>
<File
RelativePath=".\source\jaudiolib\mv_mix-c.c"
>
</File>
<File
RelativePath=".\source\jaudiolib\openal.c"
>

View file

@ -1874,7 +1874,7 @@ static void ReadPaletteTable()
return;
}
}
initprintf("Loading palette lookups... ");
// initprintf("Loading palette lookups... ");
kread(fp,&num_tables,1);
for (j=0;j<num_tables;j++)
{

View file

@ -164,7 +164,7 @@ void CONFIG_SetDefaultKeys(int type)
ud.config.KeyboardKeys[f][1] = KB_StringToScanCode((char *)oldkeydefaults[i+2]);
if (f == gamefunc_Show_Console) OSD_CaptureKey(ud.config.KeyboardKeys[f][0]);
else MapKey(f, ud.config.KeyboardKeys[f][0], 0, ud.config.KeyboardKeys[f][1], 0);
else CONFIG_MapKey(f, ud.config.KeyboardKeys[f][0], 0, ud.config.KeyboardKeys[f][1], 0);
}
return;
}
@ -177,7 +177,7 @@ void CONFIG_SetDefaultKeys(int type)
ud.config.KeyboardKeys[f][1] = KB_StringToScanCode(keydefaults[i+2]);
if (f == gamefunc_Show_Console) OSD_CaptureKey(ud.config.KeyboardKeys[f][0]);
else MapKey(f, ud.config.KeyboardKeys[f][0], 0, ud.config.KeyboardKeys[f][1], 0);
else CONFIG_MapKey(f, ud.config.KeyboardKeys[f][0], 0, ud.config.KeyboardKeys[f][1], 0);
}
}
@ -382,12 +382,12 @@ void CONFIG_ReadKeys(void)
if (i == gamefunc_Show_Console)
OSD_CaptureKey(ud.config.KeyboardKeys[i][0]);
else
MapKey(i, ud.config.KeyboardKeys[i][0], 0, ud.config.KeyboardKeys[i][1], 0);
CONFIG_MapKey(i, ud.config.KeyboardKeys[i][0], 0, ud.config.KeyboardKeys[i][1], 0);
}
}
// wrapper for CONTROL_MapKey(), generates key bindings to reflect changes to keyboard setup
void MapKey(int32 which, kb_scancode key1, kb_scancode oldkey1, kb_scancode key2, kb_scancode oldkey2)
void CONFIG_MapKey(int32 which, kb_scancode key1, kb_scancode oldkey1, kb_scancode key2, kb_scancode oldkey2)
{
int i, j, k;
int ii[] = { key1, key2, oldkey1, oldkey2 };

View file

@ -37,6 +37,6 @@ void CONFIG_SetDefaultKeys(int type);
int32 CONFIG_GetMapBestTime(char *mapname);
int32 CONFIG_SetMapBestTime(char *mapname, int32 tm);
void MapKey(int32 which, kb_scancode key1, kb_scancode oldkey1, kb_scancode key2, kb_scancode oldkey2);
void CONFIG_MapKey(int32 which, kb_scancode key1, kb_scancode oldkey1, kb_scancode key2, kb_scancode oldkey2);
#endif

View file

@ -9832,11 +9832,11 @@ static void Startup(void)
inittimer(TICRATE);
//initprintf("* Hold Esc to Abort. *\n");
initprintf("Loading art header...\n");
// initprintf("Loading art header...\n");
if (loadpics("tiles000.art",MAXCACHE1DSIZE) < 0)
gameexit("Failed loading art.");
initprintf("Loading palette/lookups...\n");
// initprintf("Loading palette/lookups...\n");
genspriteremaps();
readsavenames();
@ -10517,9 +10517,9 @@ void app_main(int argc,const char **argv)
ud.config.ScreenBPP = bpp[i];
}
initprintf("Checking music inits...\n");
initprintf("Initializing music...\n");
MusicStartup();
initprintf("Checking sound inits...\n");
initprintf("Initializing sound...\n");
SoundStartup();
loadtmb();

View file

@ -195,7 +195,7 @@ int DSOUND_Init(int soundcard, int mixrate, int numchannels, int samplebits, int
_DSOUND_CriticalSectionAlloced = TRUE;
}
initprintf(" - Loading DSOUND.DLL\n");
// initprintf(" - Loading DSOUND.DLL\n");
hDSoundDLL = LoadLibrary("DSOUND.DLL");
if (!hDSoundDLL)
{
@ -212,7 +212,7 @@ int DSOUND_Init(int soundcard, int mixrate, int numchannels, int samplebits, int
return DSOUND_Error;
}
initprintf(" - Creating DirectSound object\n");
// initprintf(" - Creating DirectSound object\n");
hr = aDirectSoundCreate(NULL, &lpDS, NULL);
if (hr != DS_OK)
{
@ -229,7 +229,7 @@ int DSOUND_Init(int soundcard, int mixrate, int numchannels, int samplebits, int
return DSOUND_Error;
}
initprintf(" - Creating primary buffer\n");
// initprintf(" - Creating primary buffer\n");
ZeroMemory(&dsbuf, sizeof(dsbuf));
dsbuf.dwSize = sizeof(DSBUFFERDESC);
dsbuf.dwFlags = DSBCAPS_PRIMARYBUFFER;
@ -351,7 +351,7 @@ int DSOUND_Shutdown(void)
if (lpDSBSecondary)
{
initprintf(" - Releasing secondary buffer\n");
// initprintf(" - Releasing secondary buffer\n");
IDirectSoundBuffer_Stop(lpDSBSecondary);
IDirectSoundBuffer_Release(lpDSBSecondary);
lpDSBSecondary = NULL;
@ -359,21 +359,21 @@ int DSOUND_Shutdown(void)
if (lpDSBPrimary)
{
initprintf(" - Releasing primary buffer\n");
// initprintf(" - Releasing primary buffer\n");
IDirectSoundBuffer_Release(lpDSBPrimary);
lpDSBPrimary = NULL;
}
if (lpDS)
{
initprintf(" - Releasing DirectSound object\n");
// initprintf(" - Releasing DirectSound object\n");
IDirectSound_Release(lpDS);
lpDS = NULL;
}
if (hDSoundDLL)
{
initprintf(" - Unloading DSOUND.DLL\n");
// initprintf(" - Unloading DSOUND.DLL\n");
FreeLibrary(hDSoundDLL);
hDSoundDLL = NULL;
}
@ -589,10 +589,12 @@ int DSOUND_StopPlayback(void)
{
SetEvent(isrfinish);
initprintf("DirectSound: Waiting for sound thread to exit\n");
if (WaitForSingleObject(isrthread, 300) == WAIT_OBJECT_0)
initprintf("DirectSound: Sound thread has exited\n");
else
// initprintf("DirectSound: Waiting for sound thread to exit\n");
// if (WaitForSingleObject(isrthread, 300) == WAIT_OBJECT_0)
// initprintf("DirectSound: Sound thread has exited\n");
// else
// initprintf("DirectSound: Sound thread failed to exit!\n");
if (WaitForSingleObject(isrthread, 300) != WAIT_OBJECT_0)
initprintf("DirectSound: Sound thread failed to exit!\n");
/*
while (1) {

View file

@ -960,10 +960,12 @@ boolean CONTROL_Startup(controltype which, int32(*TimeFunction)(void), int32 tic
// break;
//}
/*
if (CONTROL_MousePresent)
initprintf("CONTROL_Startup: Mouse Present\n");
if (CONTROL_JoyPresent)
initprintf("CONTROL_Startup: Joystick Present\n");
*/
CONTROL_ButtonState1 = 0;
CONTROL_ButtonState2 = 0;

View file

@ -2491,17 +2491,21 @@ cheat_for_port_credits:
gametextpal(d,yy, glwidescreen ? "On" : "Off", MENUHIGHLIGHT(io), 0);
break;
case 1:
if (x==io)
{
int dummy = glanisotropy;
modval(0,glinfo.maxanisotropy+1,(int *)&dummy,1,probey==io);
if (dummy > glanisotropy) glanisotropy *= 2;
else if (dummy < glanisotropy) glanisotropy /= 2;
if (x==io)
glanisotropy *= 2;
if (glanisotropy > glinfo.maxanisotropy) glanisotropy = 1;
else if (glanisotropy < 1) glanisotropy = glinfo.maxanisotropy;
gltexapplyprops();
}
if (glanisotropy == 1) strcpy(tempbuf,"NONE");
else sprintf(tempbuf,"%dx",glanisotropy);
gametextpal(d,yy, tempbuf, MENUHIGHLIGHT(io), 0);
break;
}
case 2:
if (x==io) usehightile = 1-usehightile;
modval(0,1,(int *)&usehightile,1,probey==io);
@ -3231,8 +3235,8 @@ cheat_for_port_credits:
(newvidmode==validmodecnt)?ydim:validmode[newvidmode].ydim);
gametext(c+154,50-8,tempbuf,MENUHIGHLIGHT(0),2+8+16);
menutext(c,50+16,MENUHIGHLIGHT(1),0,"VIDEO MODE");
sprintf(tempbuf, "%dbit %s", vidsets[newvidset]&0x0ffff, (vidsets[newvidset]&0x20000)?"Polymost":"Classic");
menutext(c,50+16,MENUHIGHLIGHT(1),0,"RENDERER");
sprintf(tempbuf, "%d-bit %s", vidsets[newvidset]&0x0ffff, (vidsets[newvidset]&0x20000)?"OpenGL":"Software");
gametext(c+154,50+16-8,tempbuf,MENUHIGHLIGHT(1),2+8+16);
menutext(c,50+16+16,MENUHIGHLIGHT(2),0,"FULLSCREEN");
@ -3354,7 +3358,7 @@ cheat_for_port_credits:
key[0] = ud.config.KeyboardKeys[probey][0];
key[1] = ud.config.KeyboardKeys[probey][1];
ud.config.KeyboardKeys[probey][currentlist] = 0xff;
MapKey(probey, ud.config.KeyboardKeys[probey][0], key[0], ud.config.KeyboardKeys[probey][1], key[1]);
CONFIG_MapKey(probey, ud.config.KeyboardKeys[probey][0], key[0], ud.config.KeyboardKeys[probey][1], key[1]);
sound(KICK_HIT);
KB_ClearKeyDown(sc_Delete);
}
@ -3419,7 +3423,7 @@ cheat_for_port_credits:
if (function == gamefunc_Show_Console)
OSD_CaptureKey(KB_GetLastScanCode());
else
MapKey(function, ud.config.KeyboardKeys[function][0], key[0], ud.config.KeyboardKeys[function][1], key[1]);
CONFIG_MapKey(function, ud.config.KeyboardKeys[function][0], key[0], ud.config.KeyboardKeys[function][1], key[1]);
}
cmenu(204);

View file

@ -354,9 +354,9 @@ static int osdcmd_restartsound(const osdfuncparm_t *parm)
SoundShutdown();
MusicShutdown();
initprintf("Checking music inits...\n");
initprintf("Initializing music...\n");
MusicStartup();
initprintf("Checking sound inits...\n");
initprintf("Initializing sound...\n");
SoundStartup();
FX_StopAllSounds();

View file

@ -78,7 +78,7 @@ int32 RTS_AddFile(const char *filename)
startlump = numlumps;
// WAD file
initprintf(" Adding %s.\n",filename);
// initprintf(" Adding %s.\n",filename);
kread(handle, &header, sizeof(header));
if (strncmp(header.identification,"IWAD",4))
{
@ -146,7 +146,7 @@ void RTS_Init(const char *filename)
numlumps = 0;
lumpinfo = NULL; // will be realloced as lumps are added
initprintf("RTS Manager Started.\n");
// initprintf("RTS Manager Started.\n");
if (RTS_AddFile(filename)) return;
if (!numlumps) return;