mirror of https://github.com/encounter/SDL.git
Removed newlines from error messages.
This commit is contained in:
parent
00da0824f5
commit
266816b4aa
|
@ -116,7 +116,7 @@ LoadNASLibrary(void)
|
||||||
char *err = (char *) alloca(len);
|
char *err = (char *) alloca(len);
|
||||||
SDL_strlcpy(err, origerr, len);
|
SDL_strlcpy(err, origerr, len);
|
||||||
retval = -1;
|
retval = -1;
|
||||||
SDL_SetError("NAS: SDL_LoadObject('%s') failed: %s\n",
|
SDL_SetError("NAS: SDL_LoadObject('%s') failed: %s",
|
||||||
nas_library, err);
|
nas_library, err);
|
||||||
} else {
|
} else {
|
||||||
retval = load_nas_syms();
|
retval = load_nas_syms();
|
||||||
|
|
|
@ -374,7 +374,7 @@ static int dollarNormalize(const SDL_DollarPath *path,SDL_FloatPoint *points)
|
||||||
dist += d;
|
dist += d;
|
||||||
}
|
}
|
||||||
if (numPoints < DOLLARNPOINTS-1) {
|
if (numPoints < DOLLARNPOINTS-1) {
|
||||||
SDL_SetError("ERROR: NumPoints = %i\n",numPoints);
|
SDL_SetError("ERROR: NumPoints = %i", numPoints);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* copy the last point */
|
/* copy the last point */
|
||||||
|
|
|
@ -275,7 +275,7 @@ GL_LoadFunctions(GL_RenderData * data)
|
||||||
do { \
|
do { \
|
||||||
data->func = SDL_GL_GetProcAddress(#func); \
|
data->func = SDL_GL_GetProcAddress(#func); \
|
||||||
if ( ! data->func ) { \
|
if ( ! data->func ) { \
|
||||||
return SDL_SetError("Couldn't load GL function %s: %s\n", #func, SDL_GetError()); \
|
return SDL_SetError("Couldn't load GL function %s: %s", #func, SDL_GetError()); \
|
||||||
} \
|
} \
|
||||||
} while ( 0 );
|
} while ( 0 );
|
||||||
#endif /* __SDL_NOGETPROCADDR__ */
|
#endif /* __SDL_NOGETPROCADDR__ */
|
||||||
|
|
|
@ -197,7 +197,7 @@ static int GLES_LoadFunctions(GLES_RenderData * data)
|
||||||
do { \
|
do { \
|
||||||
data->func = SDL_GL_GetProcAddress(#func); \
|
data->func = SDL_GL_GetProcAddress(#func); \
|
||||||
if ( ! data->func ) { \
|
if ( ! data->func ) { \
|
||||||
return SDL_SetError("Couldn't load GLES function %s: %s\n", #func, SDL_GetError()); \
|
return SDL_SetError("Couldn't load GLES function %s: %s", #func, SDL_GetError()); \
|
||||||
} \
|
} \
|
||||||
} while ( 0 );
|
} while ( 0 );
|
||||||
#define SDL_PROC_OES(ret,func,params) \
|
#define SDL_PROC_OES(ret,func,params) \
|
||||||
|
|
|
@ -297,7 +297,7 @@ static int GLES2_LoadFunctions(GLES2_DriverContext * data)
|
||||||
do { \
|
do { \
|
||||||
data->func = SDL_GL_GetProcAddress(#func); \
|
data->func = SDL_GL_GetProcAddress(#func); \
|
||||||
if ( ! data->func ) { \
|
if ( ! data->func ) { \
|
||||||
return SDL_SetError("Couldn't load GLES2 function %s: %s\n", #func, SDL_GetError()); \
|
return SDL_SetError("Couldn't load GLES2 function %s: %s", #func, SDL_GetError()); \
|
||||||
} \
|
} \
|
||||||
} while ( 0 );
|
} while ( 0 );
|
||||||
#endif /* __SDL_NOGETPROCADDR__ */
|
#endif /* __SDL_NOGETPROCADDR__ */
|
||||||
|
|
|
@ -102,7 +102,7 @@ generate_rowbytes(int src_w, int dst_w, int bpp)
|
||||||
store = STORE_WORD;
|
store = STORE_WORD;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return SDL_SetError("ASM stretch of %d bytes isn't supported\n", bpp);
|
return SDL_SetError("ASM stretch of %d bytes isn't supported", bpp);
|
||||||
}
|
}
|
||||||
#ifdef HAVE_MPROTECT
|
#ifdef HAVE_MPROTECT
|
||||||
/* Make the code writeable */
|
/* Make the code writeable */
|
||||||
|
|
|
@ -128,7 +128,7 @@ Android_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
|
||||||
info->info.android.surface = data->egl_surface;
|
info->info.android.surface = data->egl_surface;
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
} else {
|
} else {
|
||||||
SDL_SetError("Application not compiled with SDL %d.%d\n",
|
SDL_SetError("Application not compiled with SDL %d.%d",
|
||||||
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1706,7 +1706,7 @@ Cocoa_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
|
||||||
info->info.cocoa.window = nswindow;
|
info->info.cocoa.window = nswindow;
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
} else {
|
} else {
|
||||||
SDL_SetError("Application not compiled with SDL %d.%d\n",
|
SDL_SetError("Application not compiled with SDL %d.%d",
|
||||||
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -530,7 +530,7 @@ DirectFB_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
|
||||||
/* find the right pixelformat */
|
/* find the right pixelformat */
|
||||||
pixelformat = DirectFB_SDLToDFBPixelFormat(texture->format);
|
pixelformat = DirectFB_SDLToDFBPixelFormat(texture->format);
|
||||||
if (pixelformat == DSPF_UNKNOWN) {
|
if (pixelformat == DSPF_UNKNOWN) {
|
||||||
SDL_SetError("Unknown pixel format %d\n", data->format);
|
SDL_SetError("Unknown pixel format %d", data->format);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -469,7 +469,7 @@ DirectFB_GetWindowWMInfo(_THIS, SDL_Window * window,
|
||||||
info->info.dfb.surface = windata->surface;
|
info->info.dfb.surface = windata->surface;
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
} else {
|
} else {
|
||||||
SDL_SetError("Application not compiled with SDL %d.%d\n",
|
SDL_SetError("Application not compiled with SDL %d.%d",
|
||||||
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ int BE_CreateWindowFramebuffer(_THIS, SDL_Window * window,
|
||||||
|
|
||||||
if(bitmap->InitCheck() != B_OK) {
|
if(bitmap->InitCheck() != B_OK) {
|
||||||
delete bitmap;
|
delete bitmap;
|
||||||
return SDL_SetError("Could not initialize back buffer!\n");
|
return SDL_SetError("Could not initialize back buffer!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -310,7 +310,7 @@ int BE_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode){
|
||||||
}
|
}
|
||||||
|
|
||||||
if(bscreen.SetMode(bmode) != B_OK) {
|
if(bscreen.SetMode(bmode) != B_OK) {
|
||||||
return SDL_SetError("Bad video mode\n");
|
return SDL_SetError("Bad video mode");
|
||||||
}
|
}
|
||||||
|
|
||||||
free(bmode_list);
|
free(bmode_list);
|
||||||
|
|
|
@ -304,7 +304,7 @@ PND_getwindowwminfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
|
||||||
if (info->version.major <= SDL_MAJOR_VERSION) {
|
if (info->version.major <= SDL_MAJOR_VERSION) {
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
} else {
|
} else {
|
||||||
SDL_SetError("application not compiled with SDL %d.%d\n",
|
SDL_SetError("application not compiled with SDL %d.%d",
|
||||||
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -637,7 +637,7 @@ PND_gl_createcontext(_THIS, SDL_Window * window)
|
||||||
|
|
||||||
|
|
||||||
if (wdata->gles_surface == 0) {
|
if (wdata->gles_surface == 0) {
|
||||||
SDL_SetError("Error : eglCreateWindowSurface failed;\n");
|
SDL_SetError("Error : eglCreateWindowSurface failed;");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -260,12 +260,12 @@ void PSP_EventInit(_THIS)
|
||||||
#endif
|
#endif
|
||||||
/* Start thread to read data */
|
/* Start thread to read data */
|
||||||
if((event_sem = SDL_CreateSemaphore(1)) == NULL) {
|
if((event_sem = SDL_CreateSemaphore(1)) == NULL) {
|
||||||
SDL_SetError("Can't create input semaphore\n");
|
SDL_SetError("Can't create input semaphore");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
running = 1;
|
running = 1;
|
||||||
if((thread = SDL_CreateThreadInternal(EventUpdate, "PSPInputThread", 4096, NULL)) == NULL) {
|
if((thread = SDL_CreateThreadInternal(EventUpdate, "PSPInputThread", 4096, NULL)) == NULL) {
|
||||||
SDL_SetError("Can't create input thread\n");
|
SDL_SetError("Can't create input thread");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -297,7 +297,7 @@ PSP_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
|
||||||
if (info->version.major <= SDL_MAJOR_VERSION) {
|
if (info->version.major <= SDL_MAJOR_VERSION) {
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
} else {
|
} else {
|
||||||
SDL_SetError("application not compiled with SDL %d.%d\n",
|
SDL_SetError("application not compiled with SDL %d.%d",
|
||||||
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -373,7 +373,7 @@ RPI_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
|
||||||
if (info->version.major <= SDL_MAJOR_VERSION) {
|
if (info->version.major <= SDL_MAJOR_VERSION) {
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
} else {
|
} else {
|
||||||
SDL_SetError("application not compiled with SDL %d.%d\n",
|
SDL_SetError("application not compiled with SDL %d.%d",
|
||||||
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -360,7 +360,7 @@ UIKit_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
|
||||||
|
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
} else {
|
} else {
|
||||||
SDL_SetError("Application not compiled with SDL %d.%d\n",
|
SDL_SetError("Application not compiled with SDL %d.%d",
|
||||||
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -376,7 +376,7 @@ VIVANTE_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
|
||||||
info->info.vivante.window = data->native_window;
|
info->info.vivante.window = data->native_window;
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
} else {
|
} else {
|
||||||
SDL_SetError("Application not compiled with SDL %d.%d\n",
|
SDL_SetError("Application not compiled with SDL %d.%d",
|
||||||
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -713,7 +713,7 @@ WIN_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
|
||||||
|
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
} else {
|
} else {
|
||||||
SDL_SetError("Application not compiled with SDL %d.%d\n",
|
SDL_SetError("Application not compiled with SDL %d.%d",
|
||||||
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -771,7 +771,7 @@ WINRT_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
|
||||||
info->info.winrt.window = reinterpret_cast<IInspectable *>(data->coreWindow.Get());
|
info->info.winrt.window = reinterpret_cast<IInspectable *>(data->coreWindow.Get());
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
} else {
|
} else {
|
||||||
SDL_SetError("Application not compiled with SDL %d.%d\n",
|
SDL_SetError("Application not compiled with SDL %d.%d",
|
||||||
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -566,7 +566,7 @@ X11_GL_ErrorHandler(Display * d, XErrorEvent * e)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SDL_SetError("Could not %s: %i (Base %i)\n", errorHandlerOperation, errorCode, errorBase);
|
SDL_SetError("Could not %s: %i (Base %i)", errorHandlerOperation, errorCode, errorBase);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
|
|
|
@ -1576,7 +1576,7 @@ X11_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
|
||||||
info->info.x11.window = data->xwindow;
|
info->info.x11.window = data->xwindow;
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
} else {
|
} else {
|
||||||
SDL_SetError("Application not compiled with SDL %d.%d\n",
|
SDL_SetError("Application not compiled with SDL %d.%d",
|
||||||
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ static int LoadContext(GL_Context * data)
|
||||||
do { \
|
do { \
|
||||||
data->func = SDL_GL_GetProcAddress(#func); \
|
data->func = SDL_GL_GetProcAddress(#func); \
|
||||||
if ( ! data->func ) { \
|
if ( ! data->func ) { \
|
||||||
return SDL_SetError("Couldn't load GL function %s: %s\n", #func, SDL_GetError()); \
|
return SDL_SetError("Couldn't load GL function %s: %s", #func, SDL_GetError()); \
|
||||||
} \
|
} \
|
||||||
} while ( 0 );
|
} while ( 0 );
|
||||||
#endif /* __SDL_NOGETPROCADDR__ */
|
#endif /* __SDL_NOGETPROCADDR__ */
|
||||||
|
|
|
@ -59,7 +59,7 @@ static int LoadContext(GLES2_Context * data)
|
||||||
do { \
|
do { \
|
||||||
data->func = SDL_GL_GetProcAddress(#func); \
|
data->func = SDL_GL_GetProcAddress(#func); \
|
||||||
if ( ! data->func ) { \
|
if ( ! data->func ) { \
|
||||||
return SDL_SetError("Couldn't load GLES2 function %s: %s\n", #func, SDL_GetError()); \
|
return SDL_SetError("Couldn't load GLES2 function %s: %s", #func, SDL_GetError()); \
|
||||||
} \
|
} \
|
||||||
} while ( 0 );
|
} while ( 0 );
|
||||||
#endif /* __SDL_NOGETPROCADDR__ */
|
#endif /* __SDL_NOGETPROCADDR__ */
|
||||||
|
|
Loading…
Reference in New Issue