2014-01-14
+ * fixed bug when displaying game envelope with even sized playfield
* added graphic configuration options for request (dialog) buttons
+2014-01-13
+ * fixed some redraw bugs with window scaling under Mac OS X
+
+2014-01-10
+ * fixed problems with window scaling and updating related setup value
+
2014-01-07
* fixed problems related to fullscreen switching and window scaling
-#define COMPILE_DATE_STRING "2014-01-14 23:33"
+#define COMPILE_DATE_STRING "2014-01-15 19:23"
return getStringCat3WithSeparator(path1, path2, path3, STRING_PATH_SEPARATOR);
}
-char *getStringCopy(char *s)
+char *getStringCopy(const char *s)
{
char *s_copy;
return s_copy;
}
-char *getStringCopyN(char *s, int n)
+char *getStringCopyN(const char *s, int n)
{
char *s_copy;
int s_len = MAX(0, n);
return s_copy;
}
-char *getStringToLower(char *s)
+char *getStringCopyNStatic(const char *s, int n)
+{
+ static char *s_copy = NULL;
+
+ checked_free(s_copy);
+
+ s_copy = getStringCopyN(s, n);
+
+ return s_copy;
+}
+
+char *getStringToLower(const char *s)
{
char *s_copy = checked_malloc(strlen(s) + 1);
char *s_ptr = s_copy;
/* error handling functions */
/* ------------------------------------------------------------------------- */
+#define MAX_INTERNAL_ERROR_SIZE 1024
+
/* used by SetError() and GetError() to store internal error messages */
-static char internal_error[1024]; /* this is bad */
+static char internal_error[MAX_INTERNAL_ERROR_SIZE];
void SetError(char *format, ...)
{
va_list ap;
va_start(ap, format);
- vsprintf(internal_error, format, ap);
+ vsnprintf(internal_error, MAX_INTERNAL_ERROR_SIZE, format, ap);
va_end(ap);
}
char *getStringCat3(char *, char *, char *);
char *getPath2(char *, char *);
char *getPath3(char *, char *, char*);
-char *getStringCopy(char *);
-char *getStringCopyN(char *, int);
-char *getStringToLower(char *);
+char *getStringCopy(const char *);
+char *getStringCopyN(const char *, int);
+char *getStringCopyNStatic(const char *, int);
+char *getStringToLower(const char *);
void setString(char **, char *);
boolean strEqual(char *, char *);
boolean strEqualN(char *, char *, int);
int ystart1 = mSY - SY + 100;
int ystart2 = mSY - SY + 150;
int ybottom = mSY - SY + SYSIZE - 20;
- int xstart1 = mSX + 2 * xstep;
- int xstart2 = mSX + 19 * xstep;
+ int xstart1 = mSX - SX + 2 * xstep;
+ int xstart2 = mSX - SX + 18 * xstep;
#if defined(TARGET_SDL)
- int xstart3 = mSX + 29 * xstep;
+ int xstart3 = mSX - SX + 28 * xstep;
SDL_version sdl_version_compiled;
-#if defined(TARGET_SDL2)
- SDL_version sdl_version_linked_ext;
-#endif
const SDL_version *sdl_version_linked;
+ int driver_name_len = 10;
#if defined(TARGET_SDL2)
+ SDL_version sdl_version_linked_ext;
const char *driver_name = NULL;
#else
- int driver_name_len = 8;
char driver_name[driver_name_len];
#endif
#endif
DrawTextF(xstart3, ystart2, font_header, "Used");
#if defined(TARGET_SDL2)
- driver_name = SDL_GetVideoDriver(0);
+ driver_name = getStringCopyNStatic(SDL_GetVideoDriver(0), driver_name_len);
#else
SDL_VideoDriverName(driver_name, driver_name_len);
#endif
DrawTextF(xstart3, ystart2, font_text, "%s", driver_name);
#if defined(TARGET_SDL2)
- driver_name = SDL_GetAudioDriver(0);
+ driver_name = getStringCopyNStatic(SDL_GetAudioDriver(0), driver_name_len);
#else
SDL_AudioDriverName(driver_name, driver_name_len);
#endif