diff --git a/src/avp/language.c b/src/avp/language.c index e27b1df..b0b7fcc 100644 --- a/src/avp/language.c +++ b/src/avp/language.c @@ -34,6 +34,7 @@ static char *TextBufferPtr; void InitTextStrings(void) { + char *filename; char *textPtr; int i; @@ -42,17 +43,27 @@ void InitTextStrings(void) GLOBALASSERT(AvP.Language +#else +#include +#endif + #include #include #include -//#include #include #include "ffread.hpp" @@ -28,7 +33,7 @@ void ReportError(char const * mesg1, char const * mesg2) } else { -#if 0 +#ifdef WIN32 char * lpMsgBuf; err = GetLastError(); @@ -51,10 +56,15 @@ void ReportError(char const * mesg1, char const * mesg2) // Free the buffer. LocalFree( lpMsgBuf ); -#endif - mesg = new char [strlen(mesg1)+32]; +#else + mesg2 = strerror(errno); + + mesg = new char [strlen(mesg1)+32+strlen(mesg2)+1]; strcpy(mesg, mesg1); - strcat(mesg, "\n\nReportError: I have no clue!\n"); + strcat(mesg, "\n\nReportError: "); + strcat(mesg, mesg2); + strcat(mesg, "\n"); +#endif } // Display the string. diff --git a/src/main.c b/src/main.c index 43a0278..22918df 100644 --- a/src/main.c +++ b/src/main.c @@ -182,6 +182,7 @@ unsigned char *GetScreenShot24(int *width, int *height) buf = (unsigned char *)malloc(surface->w * surface->h * 3); if (surface->flags & SDL_OPENGL) { + glPixelStorei(GL_PACK_ALIGNMENT, 1); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); glReadPixels(0, 0, surface->w, surface->h, GL_RGB, GL_UNSIGNED_BYTE, buf); } else {