Changed GetModuleFileName calls to GetModuleFileNameA to ensure that the 8 bit character version is used. Fixes build errors with Qt6 using C++17.
This commit is contained in:
parent
c1d6d7f4cf
commit
904652efa9
|
@ -238,7 +238,7 @@ int fceuExecutablePath( char *outputPath, int outputSize )
|
|||
char directory[2048];
|
||||
char finalPath[2048];
|
||||
|
||||
GetModuleFileName(NULL, fullPath, 2048);
|
||||
GetModuleFileNameA(NULL, fullPath, 2048);
|
||||
_splitpath(fullPath, driveLetter, directory, NULL, NULL);
|
||||
snprintf(finalPath, sizeof(finalPath), "%s%s", driveLetter, directory);
|
||||
strncpy( outputPath, finalPath, outputSize );
|
||||
|
|
|
@ -390,7 +390,7 @@ GetBaseDirectory(std::string &dir)
|
|||
} else {
|
||||
#ifdef WIN32
|
||||
home = new char[MAX_PATH + 1];
|
||||
GetModuleFileName(NULL, home, MAX_PATH + 1);
|
||||
GetModuleFileNameA(NULL, home, MAX_PATH + 1);
|
||||
|
||||
char *lastBS = strrchr(home,'\\');
|
||||
if(lastBS) {
|
||||
|
|
|
@ -551,7 +551,7 @@ static int emu_getdir(lua_State *L) {
|
|||
char directory[2048];
|
||||
char finalPath[2048];
|
||||
|
||||
GetModuleFileName(NULL, fullPath, 2048);
|
||||
GetModuleFileNameA(NULL, fullPath, 2048);
|
||||
_splitpath(fullPath, driveLetter, directory, NULL, NULL);
|
||||
snprintf(finalPath, sizeof(finalPath), "%s%s", driveLetter, directory);
|
||||
lua_pushstring(L, finalPath);
|
||||
|
|
Loading…
Reference in New Issue