mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Windows: Fix some warnings.
Also one in armjit.
This commit is contained in:
parent
f4e489ee50
commit
816abce8fc
2 changed files with 5 additions and 11 deletions
|
@ -125,7 +125,7 @@ static bool ResolvePathVista(const std::wstring &path, wchar_t *buf, DWORD bufSi
|
||||||
if (hFile == INVALID_HANDLE_VALUE)
|
if (hFile == INVALID_HANDLE_VALUE)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int result = getFinalPathNameByHandleW(hFile, buf, bufSize - 1, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS);
|
DWORD result = getFinalPathNameByHandleW(hFile, buf, bufSize - 1, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS);
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
|
|
||||||
return result < bufSize && result != 0;
|
return result < bufSize && result != 0;
|
||||||
|
@ -138,15 +138,13 @@ static bool ResolvePathVista(const std::wstring &path, wchar_t *buf, DWORD bufSi
|
||||||
std::string ResolvePath(const std::string &path) {
|
std::string ResolvePath(const std::string &path) {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
static const int BUF_SIZE = 32768;
|
static const int BUF_SIZE = 32768;
|
||||||
wchar_t *buf = new wchar_t[BUF_SIZE];
|
wchar_t *buf = new wchar_t[BUF_SIZE] {};
|
||||||
memset(buf, 0, BUF_SIZE);
|
|
||||||
|
|
||||||
std::wstring input = ConvertUTF8ToWString(path);
|
std::wstring input = ConvertUTF8ToWString(path);
|
||||||
// Try to resolve symlinks (such as Documents aliases, etc.) if possible on Vista and higher.
|
// Try to resolve symlinks (such as Documents aliases, etc.) if possible on Vista and higher.
|
||||||
// For some paths and remote shares, this may fail, so fall back.
|
// For some paths and remote shares, this may fail, so fall back.
|
||||||
if (!ResolvePathVista(input, buf, BUF_SIZE)) {
|
if (!ResolvePathVista(input, buf, BUF_SIZE)) {
|
||||||
wchar_t *longBuf = new wchar_t[BUF_SIZE];
|
wchar_t *longBuf = new wchar_t[BUF_SIZE] {};
|
||||||
memset(longBuf, 0, BUF_SIZE);
|
|
||||||
|
|
||||||
int result = GetLongPathNameW(input.c_str(), longBuf, BUF_SIZE - 1);
|
int result = GetLongPathNameW(input.c_str(), longBuf, BUF_SIZE - 1);
|
||||||
if (result >= BUF_SIZE || result == 0)
|
if (result >= BUF_SIZE || result == 0)
|
||||||
|
@ -790,12 +788,10 @@ void openIniFile(const std::string fileName) {
|
||||||
wchar_t command_line[MAX_PATH * 2 + 1 + 1];
|
wchar_t command_line[MAX_PATH * 2 + 1 + 1];
|
||||||
wsprintf(command_line, L"%s %s", notepad_path, ini_path);
|
wsprintf(command_line, L"%s %s", notepad_path, ini_path);
|
||||||
|
|
||||||
STARTUPINFO si;
|
STARTUPINFO si{};
|
||||||
memset(&si, 0, sizeof(si));
|
|
||||||
si.cb = sizeof(si);
|
si.cb = sizeof(si);
|
||||||
si.wShowWindow = SW_SHOW;
|
si.wShowWindow = SW_SHOW;
|
||||||
PROCESS_INFORMATION pi;
|
PROCESS_INFORMATION pi{};
|
||||||
memset(&pi, 0, sizeof(pi));
|
|
||||||
UINT retval = CreateProcess(0, command_line, 0, 0, 0, 0, 0, 0, &si, &pi);
|
UINT retval = CreateProcess(0, command_line, 0, 0, 0, 0, 0, 0, &si, &pi);
|
||||||
if (!retval) {
|
if (!retval) {
|
||||||
ERROR_LOG(COMMON, "Failed creating notepad process");
|
ERROR_LOG(COMMON, "Failed creating notepad process");
|
||||||
|
|
|
@ -328,8 +328,6 @@ const u8 *ArmJit::DoJit(u32 em_address, JitBlock *b)
|
||||||
gpr.Start(analysis);
|
gpr.Start(analysis);
|
||||||
fpr.Start(analysis);
|
fpr.Start(analysis);
|
||||||
|
|
||||||
int partialFlushOffset = 0;
|
|
||||||
|
|
||||||
js.numInstructions = 0;
|
js.numInstructions = 0;
|
||||||
while (js.compiling)
|
while (js.compiling)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue