mirror of
https://github.com/love2d/love.git
synced 2026-08-14 01:20:56 +02:00
The full executable path, rather than argv[0], is now used when determining whether the executable is fused (resolves issue #1043.)
This commit is contained in:
@@ -64,7 +64,9 @@ bool DroppedFile::open(Mode newmode)
|
||||
#ifdef LOVE_WINDOWS
|
||||
// make sure non-ASCII filenames work.
|
||||
std::wstring modestr = to_widestr(getModeString(newmode));
|
||||
file = _wfopen(to_widestr(filename).c_str(), modestr.c_str());
|
||||
std::wstring wfilename = to_widestr(filename);
|
||||
|
||||
file = _wfopen(wfilename.c_str(), modestr.c_str());
|
||||
#else
|
||||
file = fopen(filename.c_str(), getModeString(newmode));
|
||||
#endif
|
||||
@@ -105,8 +107,10 @@ int64 DroppedFile::getSize()
|
||||
#ifdef LOVE_WINDOWS
|
||||
|
||||
// make sure non-ASCII filenames work.
|
||||
std::wstring wfilename = to_widestr(filename);
|
||||
|
||||
struct _stat buf;
|
||||
if (_wstat(to_widestr(filename).c_str(), &buf) != 0)
|
||||
if (_wstat(wfilename.c_str(), &buf) != 0)
|
||||
return -1;
|
||||
|
||||
return (int64) buf.st_size;
|
||||
|
||||
Reference in New Issue
Block a user