shortened a few error messages

This commit is contained in:
Ozkan Sezer
2021-11-11 17:33:02 +03:00
parent d254f7f28e
commit c9727c8829
7 changed files with 7 additions and 21 deletions

View File

@@ -815,13 +815,7 @@ _GlideInitEnvironment(void)
const char* errStr = s; const char* errStr = s;
if (pciGetErrorCode() == PCI_ERR_NOERR) { if (pciGetErrorCode() == PCI_ERR_NOERR) {
#ifndef __linux__ sprintf(s, "%s: expected %s, none detected\n", FN_NAME, GLIDE_DRIVER_NAME);
sprintf(s, "%s: glide2x.dll expected %s, none detected\n",
FN_NAME, GLIDE_DRIVER_NAME);
#else
sprintf(s, "%s: libglide2x.so expected %s, none detected\n",
FN_NAME, GLIDE_DRIVER_NAME);
#endif
} else { } else {
errStr = pciGetErrorString(); errStr = pciGetErrorString();
} }

View File

@@ -881,7 +881,7 @@ hwcInit(FxU32 vID, FxU32 dID)
} }
if (!hInfo.nBoards) { if (!hInfo.nBoards) {
const char *error = pciGetErrorCode() ? pciGetErrorString() : const char *error = pciGetErrorCode() ? pciGetErrorString() :
"Voodoo Banshee or Voodoo3 not detected\n"; "Voodoo3 or Banshee not detected\n";
strcpy(errorString, error); strcpy(errorString, error);
} }
} }

View File

@@ -443,15 +443,9 @@ _GlideInitEnvironment( void )
_GlideRoot.curGC = &_GlideRoot.GCs[0]; /* just for 'booting' the library */ _GlideRoot.curGC = &_GlideRoot.GCs[0]; /* just for 'booting' the library */
if (!_grSstDetectResources()) { if (!_grSstDetectResources()) {
char s[128]; char s[128];
#ifndef __linux__
sprintf(s, sprintf(s,
"_GlideInitEnvironment: glide2x.dll expected %s, none detected\n", "_GlideInitEnvironment: expected %s, none detected\n",
GLIDE_DRIVER_NAME); GLIDE_DRIVER_NAME);
#else
sprintf(s,
"_GlideInitEnvironment: libglide2x.so expected %s, none detected\n",
GLIDE_DRIVER_NAME);
#endif
GrErrorCallback(s, FXTRUE); GrErrorCallback(s, FXTRUE);
} }

View File

@@ -806,8 +806,7 @@ _GlideInitEnvironment(void)
const char* errStr = s; const char* errStr = s;
if (pciGetErrorCode() == PCI_ERR_NOERR) { if (pciGetErrorCode() == PCI_ERR_NOERR) {
sprintf(s, "%s: glide3x.dll expected %s, none detected\n", sprintf(s, "%s: expected %s, none detected\n", FN_NAME, GLIDE_DRIVER_NAME);
FN_NAME, GLIDE_DRIVER_NAME);
} else { } else {
errStr = pciGetErrorString(); errStr = pciGetErrorString();
} }
@@ -828,4 +827,3 @@ _GlideInitEnvironment(void)
_GlideRoot.initialized = hwDetectP; /* save this for the end */ _GlideRoot.initialized = hwDetectP; /* save this for the end */
} }
} /* _GlideInitEnvironment */ } /* _GlideInitEnvironment */

View File

@@ -1055,7 +1055,7 @@ hwcInit(FxU32 vID, FxU32 dID)
} }
if (!hInfo.nBoards) { if (!hInfo.nBoards) {
const char *error = pciGetErrorCode() ? pciGetErrorString() : const char *error = pciGetErrorCode() ? pciGetErrorString() :
"Voodoo Banshee or Voodoo3 not detected\n"; "Voodoo3 or Banshee not detected\n";
strcpy(errorString, error); strcpy(errorString, error);
} }
} }

View File

@@ -1780,7 +1780,7 @@ hwcInit(FxU32 vID, FxU32 dID)
} }
if (!hInfo.nBoards) { if (!hInfo.nBoards) {
const char *error = pciGetErrorCode() ? pciGetErrorString() : const char *error = pciGetErrorCode() ? pciGetErrorString() :
"Voodoo Banshee or Voodoo3/4/5 not detected\n"; "Voodoo3/4/5 or Banshee not detected\n";
strcpy(errorString, error); strcpy(errorString, error);
} }
} }

View File

@@ -493,7 +493,7 @@ _GlideInitEnvironment( void )
if (!_grSstDetectResources()) { if (!_grSstDetectResources()) {
char s[128]; char s[128];
sprintf(s, sprintf(s,
"_GlideInitEnvironment: glide3x.dll expected %s, none detected\n", "_GlideInitEnvironment: expected %s, none detected\n",
GLIDE_DRIVER_NAME); GLIDE_DRIVER_NAME);
GrErrorCallback(s, FXTRUE); GrErrorCallback(s, FXTRUE);
} }