Patch from Diablo-D3 to inform folks about bit depth stuff

This commit is contained in:
theoddone33
2002-07-07 03:45:40 +00:00
parent 130b5a4d11
commit a97f6729ab

View File

@@ -580,6 +580,22 @@ BOOL InitInput()
return TRUE; return TRUE;
} }
int saybitdepth()
{
int MyBitsPerPixel;
const SDL_VideoInfo *info;
SDL_Init(SDL_INIT_VIDEO);
info = SDL_GetVideoInfo();
MyBitsPerPixel = info->vfmt->BitsPerPixel;
switch (MyBitsPerPixel)
{
case 0: printf("Cannot detect bitdepth. On fbcon and svgalib this is normal.\nTrying to force 16 bpp.\n\n"); break;
case 16: break;
default: printf("You are running in %d bpp, but ZSNES is forcing 16 bpp.\nYou may experience poor performance and/or crashing.\n\n", MyBitsPerPixel); break;
}
return 0;
}
int startgame(void) int startgame(void)
{ {
int status; int status;
@@ -598,7 +614,7 @@ int startgame(void)
if (sdl_state == vid_soft) sw_end(); if (sdl_state == vid_soft) sw_end();
#ifdef __OPENGL__ #ifdef __OPENGL__
else if (sdl_state == vid_gl) gl_end(); else if (sdl_state == vid_gl) gl_end();
saybitdepth();
if (UseOpenGL) if (UseOpenGL)
{ {
status = gl_start(WindowWidth, WindowHeight, BitDepth, FullScreen); status = gl_start(WindowWidth, WindowHeight, BitDepth, FullScreen);