mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 14:51:40 +00:00
use MAXPATHLEN for path buffer size
svn-id: r15319
This commit is contained in:
parent
7ced14e961
commit
ae73d1a4ee
@ -97,6 +97,7 @@
|
||||
#undef CMD_INVALID
|
||||
#endif
|
||||
#if !defined(macintosh)
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/uio.h>
|
||||
#endif
|
||||
|
@ -24,8 +24,12 @@
|
||||
#include "common/scummsys.h"
|
||||
|
||||
template<typename T> inline T ABS (T x) { return (x>=0) ? x : -x; }
|
||||
#if !defined(MIN)
|
||||
template<typename T> inline T MIN (T a, T b) { return (a<b) ? a : b; }
|
||||
#endif
|
||||
#if !defined(MAX)
|
||||
template<typename T> inline T MAX (T a, T b) { return (a>b) ? a : b; }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Template method which swaps the vaulues of its two parameters.
|
||||
|
@ -427,7 +427,10 @@ void GlobalOptionsDialog::open() {
|
||||
_savePath->setLabel(dir);
|
||||
} else {
|
||||
// Default to the current directory...
|
||||
char buf[256];
|
||||
#if !(defined(MAXPATHLEN))
|
||||
#define MAXPATHLEN 1024
|
||||
#endif
|
||||
char buf[MAXPATHLEN];
|
||||
getcwd(buf, sizeof(buf));
|
||||
_savePath->setLabel(buf);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user