Force CharacterSet to be Unicode in the Property Sheets

This commit is contained in:
zilmar 2020-06-09 22:34:38 +09:30
parent 9217b0cf4d
commit 366c0c69ae
18 changed files with 151 additions and 172 deletions

View File

@ -4,6 +4,7 @@
<PropertyGroup Label="Configuration">
<PlatformToolset Condition="'$(DefaultPlatformToolset)'!='' AND '$(DefaultPlatformToolset)'!='v142'">$(DefaultPlatformToolset)_xp</PlatformToolset>
<PlatformToolset Condition="'$(DefaultPlatformToolset)'=='v142'">$(DefaultPlatformToolset)</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<ImportGroup Label="PropertySheets">
@ -125,10 +126,10 @@
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(TargetDir)map/$(TargetName).map</MapFileName>
<MapExports>false</MapExports>
<HeapReserveSize>0</HeapReserveSize>
<HeapCommitSize>0</HeapCommitSize>
<StackReserveSize>0</StackReserveSize>
<StackCommitSize>0</StackCommitSize>
<HeapReserveSize />
<HeapCommitSize />
<StackReserveSize />
<StackCommitSize />
<SwapRunFromCD>false</SwapRunFromCD>
<SwapRunFromNET>false</SwapRunFromNET>
<OptimizeReferences>true</OptimizeReferences>

View File

@ -5,6 +5,6 @@
void ShowAboutWindow (void * hParent)
{
#ifdef _WIN32
MessageBox((HWND)hParent,"Android Input Plugin","Dll About",MB_OK);
MessageBox((HWND)hParent,L"Android Input Plugin",L"Dll About",MB_OK);
#endif
}

View File

@ -335,6 +335,6 @@ void CHle::VerboseMessage(const char *message, ...)
void CHle::WarnMessage(const char *message, ...)
{
#if defined(_WIN32) && defined(_DEBUG)
MessageBox(NULL, message, "HLE Warning Message", MB_OK);
MessageBoxA(NULL, message, "HLE Warning Message", MB_OK);
#endif
}

View File

@ -52,7 +52,7 @@ void CloseDLL(void)
void DllAbout(void * hParent)
{
#ifdef _WIN32
MessageBox((HWND)hParent, "need to do", "About", MB_OK | MB_ICONINFORMATION);
MessageBox((HWND)hParent, L"need to do", L"About", MB_OK | MB_ICONINFORMATION);
#endif
}

View File

@ -53,7 +53,7 @@ CFile::~CFile()
#endif
{
Close();
}
}
}
bool CFile::Open(const char * lpszFileName, uint32_t nOpenFlags)
@ -110,7 +110,7 @@ bool CFile::Open(const char * lpszFileName, uint32_t nOpenFlags)
}
// attempt file creation
HANDLE hFile = ::CreateFile(lpszFileName, dwAccess, dwShareMode, &sa, dwCreateFlag, FILE_ATTRIBUTE_NORMAL, NULL);
HANDLE hFile = ::CreateFileA(lpszFileName, dwAccess, dwShareMode, &sa, dwCreateFlag, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE)
{ //#define ERROR_PATH_NOT_FOUND 3L
//ULONG err = GetLastError();

View File

@ -121,21 +121,21 @@ void CMemList::DumpItems(void)
char path_buffer[_MAX_PATH] = { 0 }, drive[_MAX_DRIVE] = { 0 }, dir[_MAX_DIR] = { 0 };
char fname[_MAX_FNAME] = { 0 }, ext[_MAX_EXT] = { 0 }, LogFileName[_MAX_PATH] = { 0 };
GetModuleFileName(m_hModule, path_buffer, sizeof(path_buffer));
GetModuleFileNameA(m_hModule, path_buffer, sizeof(path_buffer));
_splitpath(path_buffer, drive, dir, fname, ext);
_makepath(LogFileName, drive, dir, fname, "leak.csv");
HANDLE hLogFile = INVALID_HANDLE_VALUE;
do
{
hLogFile = CreateFile( LogFileName, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL );
hLogFile = CreateFileA( LogFileName, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL );
if (hLogFile == INVALID_HANDLE_VALUE)
{
if (GetLastError() == ERROR_SHARING_VIOLATION)
{
TCHAR Msg[3000];
char Msg[3000];
sprintf(Msg, "%s\nCan not be opened for writing please close app using this file\n\nTry Again ?", LogFileName);
int Result = MessageBox(NULL, Msg, "Memory Leak", MB_YESNO | MB_ICONQUESTION | MB_SETFOREGROUND | MB_SERVICE_NOTIFICATION);
int Result = MessageBoxA(NULL, Msg, "Memory Leak", MB_YESNO | MB_ICONQUESTION | MB_SETFOREGROUND | MB_SERVICE_NOTIFICATION);
if (Result == IDNO)
{
break;
@ -162,10 +162,10 @@ void CMemList::DumpItems(void)
}
char Msg[3000];
sprintf(Msg, "%s%s\n\nMemory Leaks detected\n\nOpen the Log File ?", fname, ext);
int Result = MessageBox(NULL, Msg, "Memory Leak", MB_YESNO | MB_ICONQUESTION | MB_SETFOREGROUND | MB_SERVICE_NOTIFICATION);
int Result = MessageBoxA(NULL, Msg, "Memory Leak", MB_YESNO | MB_ICONQUESTION | MB_SETFOREGROUND | MB_SERVICE_NOTIFICATION);
if (Result == IDYES)
{
ShellExecute(NULL, "open", LogFileName, NULL, NULL, SW_SHOW);
ShellExecuteA(NULL, "open", LogFileName, NULL, NULL, SW_SHOW);
}
}

View File

@ -17,7 +17,7 @@ pjutil::DynLibHandle pjutil::DynLibOpen(const char *pccLibraryPath, bool ShowErr
}
#ifdef _WIN32
UINT LastErrorMode = SetErrorMode(ShowErrors ? 0 : SEM_FAILCRITICALERRORS);
pjutil::DynLibHandle lib = (pjutil::DynLibHandle)LoadLibrary(pccLibraryPath);
pjutil::DynLibHandle lib = (pjutil::DynLibHandle)LoadLibraryA(pccLibraryPath);
SetErrorMode(LastErrorMode);
#else
pjutil::DynLibHandle lib = (pjutil::DynLibHandle)dlopen(pccLibraryPath, RTLD_NOW);
@ -87,15 +87,18 @@ bool pjutil::TerminatedExistingExe()
{
do
{
if (_stricmp(lppe.szExeFile, ModuleName.c_str()) != 0 ||
if (_wcsicmp(lppe.szExeFile, ModuleName.ToUTF16().c_str()) != 0 ||
lppe.th32ProcessID == pid)
{
continue;
}
if (!AskedUser)
{
stdstr_f Message("%s currently running\n\nTerminate pid %d now?", ModuleName.c_str(), lppe.th32ProcessID);
stdstr_f Caption("Terminate %s", ModuleName.c_str());
AskedUser = true;
int res = MessageBox(NULL, stdstr_f("%s currently running\n\nTerminate pid %d now?", ModuleName.c_str(), lppe.th32ProcessID).c_str(), stdstr_f("Terminate %s",ModuleName.c_str()).c_str(), MB_YESNO | MB_ICONEXCLAMATION);
int res = MessageBox(NULL, Message.ToUTF16().c_str(), Caption.ToUTF16().c_str(), MB_YESNO | MB_ICONEXCLAMATION);
if (res != IDYES)
{
break;
@ -111,7 +114,9 @@ bool pjutil::TerminatedExistingExe()
}
else
{
MessageBox(NULL, stdstr_f("Failed to terminate pid %d", lppe.th32ProcessID).c_str(), stdstr_f("Terminate %s failed!",ModuleName.c_str()).c_str(), MB_YESNO | MB_ICONEXCLAMATION);
stdstr_f Message("Failed to terminate pid %d", lppe.th32ProcessID);
stdstr_f Caption("Terminate %s failed!", ModuleName.c_str());
MessageBox(NULL, Message.ToUTF16().c_str(), Caption.ToUTF16().c_str(), MB_YESNO | MB_ICONEXCLAMATION);
}
CloseHandle(hHandle);
}

View File

@ -3,10 +3,11 @@
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#ifdef _WIN32
#pragma warning(push)
#pragma warning(disable : 4091) // warning C4091: 'typedef ': ignored on left of 'tagGPFIDL_FLAGS' when no variable is declared
#pragma warning(disable : 4996) // warning C4091: 'typedef ': ignored on left of 'tagGPFIDL_FLAGS' when no variable is declared
#include <Shlobj.h>
#include <dos.h>
#pragma warning(push)
#pragma warning(disable : 4996) // warning C4091: 'typedef ': ignored on left of 'tagGPFIDL_FLAGS' when no variable is declared
#include <CommDlg.h>
#pragma warning(pop)
#else
@ -317,7 +318,7 @@ void CPath::GetComponents(std::string* pDrive, std::string* pDirectory, std::str
const char * DriveDir = strrchr(BasePath, DRIVE_DELIMITER);
if (DriveDir != NULL)
{
int len = sizeof(buff_dir) < (DriveDir - BasePath) ? sizeof(buff_drive) : DriveDir - BasePath;
size_t len = sizeof(buff_dir) < (DriveDir - BasePath) ? sizeof(buff_drive) : DriveDir - BasePath;
strncpy(buff_drive, BasePath, len);
BasePath += len + 1;
}
@ -325,7 +326,7 @@ void CPath::GetComponents(std::string* pDrive, std::string* pDirectory, std::str
const char * last = strrchr(BasePath, DIRECTORY_DELIMITER);
if (last != NULL)
{
int len = sizeof(buff_dir) < (last - BasePath) ? sizeof(buff_dir) : last - BasePath;
size_t len = sizeof(buff_dir) < (last - BasePath) ? sizeof(buff_dir) : last - BasePath;
if (len > 0)
{
strncpy(buff_dir, BasePath, len);
@ -895,7 +896,7 @@ void CPath::CurrentDirectory()
Empty();
#ifdef _WIN32
::GetCurrentDirectory(sizeof(buff_path), buff_path);
::GetCurrentDirectoryA(sizeof(buff_path), buff_path);
SetDriveDirectory(buff_path);
#else
getcwd(buff_path, sizeof(buff_path));
@ -913,7 +914,7 @@ void CPath::Module(void * hInstance)
memset(buff_path, 0, sizeof(buff_path));
GetModuleFileName((HINSTANCE)hInstance, buff_path, MAX_PATH);
GetModuleFileNameA((HINSTANCE)hInstance, buff_path, MAX_PATH);
m_strPath = buff_path;
}
@ -976,8 +977,8 @@ bool CPath::DirectoryExists() const
TestPath.UpDirectory(&DirName);
TestPath.SetNameExtension(DirName.c_str());
WIN32_FIND_DATA FindData;
HANDLE hFindFile = FindFirstFile((const char *)TestPath, &FindData); // Find anything
WIN32_FIND_DATAA FindData;
HANDLE hFindFile = FindFirstFileA((const char *)TestPath, &FindData); // Find anything
bool res = (hFindFile != INVALID_HANDLE_VALUE);
if (hFindFile != NULL) // Make sure we close the search
@ -1005,9 +1006,9 @@ bool CPath::DirectoryExists() const
bool CPath::Exists() const
{
#ifdef _WIN32
WIN32_FIND_DATA FindData;
HANDLE hFindFile = FindFirstFile(m_strPath.c_str(), &FindData);
bool bSuccess = (hFindFile != INVALID_HANDLE_VALUE);
WIN32_FIND_DATAA FindData;
HANDLE hFindFile = FindFirstFileA(m_strPath.c_str(), &FindData);
bool bSuccess = (hFindFile != INVALID_HANDLE_VALUE);
if (hFindFile != NULL) // Make sure we close the search
{
@ -1026,7 +1027,7 @@ bool CPath::SelectFile(void * hwndOwner, const char * InitialDir, const char * F
{
CPath CurrentDir(CURRENT_DIRECTORY);
OPENFILENAME openfilename;
OPENFILENAMEA openfilename;
char FileName[MAX_PATH];
memset(&FileName, 0, sizeof(FileName));
memset(&openfilename, 0, sizeof(openfilename));
@ -1039,7 +1040,7 @@ bool CPath::SelectFile(void * hwndOwner, const char * InitialDir, const char * F
openfilename.nMaxFile = MAX_PATH;
openfilename.Flags = OFN_HIDEREADONLY | (FileMustExist ? OFN_FILEMUSTEXIST : 0);
bool res = GetOpenFileName(&openfilename);
bool res = GetOpenFileNameA(&openfilename) != 0;
if (CPath(CURRENT_DIRECTORY) != CurrentDir)
{
CurrentDir.ChangeDirectory();
@ -1061,7 +1062,7 @@ bool CPath::SelectFile(void * hwndOwner, const char * InitialDir, const char * F
bool CPath::Delete(bool bEvenIfReadOnly) const
{
#ifdef _WIN32
uint32_t dwAttr = ::GetFileAttributes(m_strPath.c_str());
uint32_t dwAttr = ::GetFileAttributesA(m_strPath.c_str());
if (dwAttr == (uint32_t)-1)
{
// File does not exist.
@ -1074,8 +1075,8 @@ bool CPath::Delete(bool bEvenIfReadOnly) const
return false;
}
SetFileAttributes(m_strPath.c_str(), FILE_ATTRIBUTE_NORMAL);
return DeleteFile(m_strPath.c_str()) != 0;
SetFileAttributesA(m_strPath.c_str(), FILE_ATTRIBUTE_NORMAL);
return DeleteFileA(m_strPath.c_str()) != 0;
#else
return unlink(m_strPath.c_str()) == 0;
#endif
@ -1116,7 +1117,7 @@ bool CPath::CopyTo(const char * lpcszTargetFile, bool bOverwrite)
// CopyFile will set the target's attributes 2 the same as
// the source after copying
return CopyFile(m_strPath.c_str(), lpcszTargetFile, !bOverwrite) != 0;
return CopyFileA(m_strPath.c_str(), lpcszTargetFile, !bOverwrite) != 0;
#else
bool res = true;
@ -1230,7 +1231,7 @@ bool CPath::MoveTo(const char * lpcszTargetFile, bool bOverwrite)
}
}
return MoveFile(m_strPath.c_str(), lpcszTargetFile) != 0;
return MoveFileA(m_strPath.c_str(), lpcszTargetFile) != 0;
#else
return false;
#endif
@ -1292,8 +1293,8 @@ bool CPath::FindFirst(uint32_t dwAttributes /*= FIND_ATTRIBUTE_FILES*/)
BOOL bWantSubdirectory = (BOOL)(FIND_ATTRIBUTE_SUBDIR & dwAttributes);
// i.) Finding first candidate file
WIN32_FIND_DATA FindData;
m_hFindFile = FindFirstFile(m_strPath.c_str(), &FindData);
WIN32_FIND_DATAA FindData;
m_hFindFile = FindFirstFileA(m_strPath.c_str(), &FindData);
bGotFile = (m_hFindFile != INVALID_HANDLE_VALUE);
while (bGotFile)
@ -1316,7 +1317,7 @@ bool CPath::FindFirst(uint32_t dwAttributes /*= FIND_ATTRIBUTE_FILES*/)
// iv.) Not found match, get another
LABEL_GetAnother:
bGotFile = FindNextFile(m_hFindFile, &FindData);
bGotFile = FindNextFileA(m_hFindFile, &FindData);
}
#else
std::string Directory, Name, Extension;
@ -1349,8 +1350,8 @@ bool CPath::FindNext()
return false;
}
WIN32_FIND_DATA FindData;
while (FindNextFile(m_hFindFile, &FindData) != false)
WIN32_FIND_DATAA FindData;
while (FindNextFileA(m_hFindFile, &FindData) != false)
{ // while(FindNext(...))
if (AttributesMatch(m_dwFindFileAttributes, FindData.dwFileAttributes))
{ // if(AttributesMatch(...)
@ -1447,7 +1448,7 @@ bool CPath::ChangeDirectory()
std::string DriveDirectory;
GetDriveDirectory(DriveDirectory);
return SetCurrentDirectory(DriveDirectory.c_str()) != 0;
return SetCurrentDirectoryA(DriveDirectory.c_str()) != 0;
#else
std::string Dir;
GetDirectory(Dir);
@ -1525,7 +1526,7 @@ bool CPath::DirectoryCreate(bool bCreateIntermediates /*= TRUE*/)
GetDriveDirectory(PathText);
StripTrailingBackslash(PathText);
WriteTrace(TracePath, TraceDebug, "Create %s",PathText.c_str());
bSuccess = ::CreateDirectory(PathText.c_str(), NULL) != 0;
bSuccess = ::CreateDirectoryA(PathText.c_str(), NULL) != 0;
#else
GetDirectory(PathText);
StripTrailingBackslash(PathText);

View File

@ -284,7 +284,7 @@ extern "C" void UseUnregisteredSetting(int /*SettingID*/)
#ifdef _WIN32
void SetTimerResolution(void)
{
HMODULE hMod = GetModuleHandle("ntdll.dll");
HMODULE hMod = GetModuleHandle(L"ntdll.dll");
if (hMod != NULL)
{
typedef LONG(NTAPI* tNtSetTimerResolution)(IN ULONG DesiredResolution, IN BOOLEAN SetResolution, OUT PULONG CurrentResolution);

View File

@ -177,12 +177,12 @@ public:
for (size_t i = 0, n = sizeof(TraceCMB) / sizeof(TraceCMB[0]); i < n; i++)
{
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString("Error"), TraceError);
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString("Warning"), TraceWarning);
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString("Notice"), TraceNotice);
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString("Info"), TraceInfo);
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString("Debug"), TraceDebug);
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString("Verbose"), TraceVerbose);
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString(L"Error"), TraceError);
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString(L"Warning"), TraceWarning);
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString(L"Notice"), TraceNotice);
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString(L"Info"), TraceInfo);
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString(L"Debug"), TraceDebug);
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString(L"Verbose"), TraceVerbose);
SetComboBoxIndex(TraceCMB[i].cmb, (uint32_t)GetSetting(TraceCMB[i].SettingId));
}
return TRUE;

View File

@ -261,14 +261,14 @@ public:
m_WindowRes.Attach(GetDlgItem(IDC_CMB_WINDOW_RES));
for (uint32_t i = 0, n = GetScreenResolutionCount(); i < n; i++)
{
m_WindowRes.SetItemData(m_WindowRes.AddString(GetScreenResolutionName(i)), i);
m_WindowRes.SetItemData(m_WindowRes.AddString(stdstr(GetScreenResolutionName(i)).ToUTF16().c_str()), i);
}
SetComboBoxIndex(m_WindowRes, g_settings->ScreenRes());
TTSetTxt(IDC_CMB_WINDOW_RES, "Resolution:\n\nThis option selects the windowed resolution.\n\n[Recommended: 640x480, 800x600, 1024x768]");
TTSetTxt(IDC_CMB_WINDOW_RES, L"Resolution:\n\nThis option selects the windowed resolution.\n\n[Recommended: 640x480, 800x600, 1024x768]");
m_cbxVSync.Attach(GetDlgItem(IDC_CHK_VERTICAL_SYNC));
m_cbxVSync.SetCheck(g_settings->vsync() ? BST_CHECKED : BST_UNCHECKED);
TTSetTxt(IDC_CHK_VERTICAL_SYNC, "Vertical sync:\n\nThis option will enable the vertical sync, which will prevent tearing.\nNote: this option will ONLY have effect if vsync is set to \"Software Controlled\".");
TTSetTxt(IDC_CHK_VERTICAL_SYNC, L"Vertical sync:\n\nThis option will enable the vertical sync, which will prevent tearing.\nNote: this option will ONLY have effect if vsync is set to \"Software Controlled\".");
m_cbxTextureSettings.Attach(GetDlgItem(IDC_CHK_SHOW_TEXTURE_ENHANCEMENT));
m_cbxTextureSettings.SetCheck(g_settings->texenh_options() ? BST_CHECKED : BST_UNCHECKED);
@ -280,22 +280,22 @@ public:
{
for (int r = 0; r < size; r++)
{
m_cmbFSResolution.AddString(aRes[r]);
m_cmbFSResolution.AddString(stdstr(aRes[r]).ToUTF16().c_str());
}
m_cmbFSResolution.SetCurSel(g_settings->FullScreenRes() < size ? g_settings->FullScreenRes() : 0);
}
TTSetTxt(IDC_CMB_FS_RESOLUTION, "Full screen resolution:\n\nThis sets the full screen resolution.\nAll the resolutions that your video card / monitor support should be displayed.\n\n[Recommended:native(max) resolution of your monitor - unless performance becomes an issue]");
TTSetTxt(IDC_CMB_FS_RESOLUTION, L"Full screen resolution:\n\nThis sets the full screen resolution.\nAll the resolutions that your video card / monitor support should be displayed.\n\n[Recommended:native(max) resolution of your monitor - unless performance becomes an issue]");
m_cbxAnisotropic.Attach(GetDlgItem(IDC_CBXANISOTROPIC));
m_cbxAnisotropic.SetCheck(g_settings->wrpAnisotropic() ? BST_CHECKED : BST_UNCHECKED);
TTSetTxt(IDC_CBXANISOTROPIC, "Anisotropic filtering:\n\nThis filter sharpens and brings out the details of textures that recede into the distance.\nWhen activated, it will use the max anisotropy your video card supports.\nHowever, this will override native way of texture filtering and may cause visual artifacts in some games.\n\n[Recommended: your preference, game dependant]");
TTSetTxt(IDC_CBXANISOTROPIC, L"Anisotropic filtering:\n\nThis filter sharpens and brings out the details of textures that recede into the distance.\nWhen activated, it will use the max anisotropy your video card supports.\nHowever, this will override native way of texture filtering and may cause visual artifacts in some games.\n\n[Recommended: your preference, game dependant]");
m_cbxFBO.Attach(GetDlgItem(IDC_CHK_USE_FRAME_BUFFER_OBJECT));
TTSetTxt(IDC_CHK_USE_FRAME_BUFFER_OBJECT, "Use frame buffer objects:\n\nChanges the way FB effects are rendered - with or without usage of the OpenGL Frame Buffer Objects (FBO) extension.\nThe choice depends on game and your video card. FBO off is good for NVIDIA cards, while for ATI cards, it's usually best that FBOs are turned on.\nAlso, some FB effects works only with one of the methods, no matter, which card you have.\nOn the whole, with FBO off, compatibility/ accuracy is a bit better (which is the case for Resident Evil 2).\nHowever, with FBO on with some systems, it can actually be a bit faster in cases.\n\n[Recommended: video card and game dependant]");
TTSetTxt(IDC_CHK_USE_FRAME_BUFFER_OBJECT, L"Use frame buffer objects:\n\nChanges the way FB effects are rendered - with or without usage of the OpenGL Frame Buffer Objects (FBO) extension.\nThe choice depends on game and your video card. FBO off is good for NVIDIA cards, while for ATI cards, it's usually best that FBOs are turned on.\nAlso, some FB effects works only with one of the methods, no matter, which card you have.\nOn the whole, with FBO off, compatibility/ accuracy is a bit better (which is the case for Resident Evil 2).\nHowever, with FBO on with some systems, it can actually be a bit faster in cases.\n\n[Recommended: video card and game dependant]");
m_cbxFBO.SetCheck(g_settings->wrpFBO() ? BST_CHECKED : BST_UNCHECKED);
m_cbxVRAM.Attach(GetDlgItem(IDC_CHK_AUTODETECT_VRAM));
TTSetTxt(IDC_CHK_AUTODETECT_VRAM, "Autodetect VRAM Size:\n\nSince OpenGL cannot do this reliably at the moment, the option to set this manually is available.\nIf checked, plugin will try to autodetect VRAM size.\nBut if this appears wrong, please uncheck and set it to correct value.\n\n[Recommended: on]");
TTSetTxt(IDC_CHK_AUTODETECT_VRAM, L"Autodetect VRAM Size:\n\nSince OpenGL cannot do this reliably at the moment, the option to set this manually is available.\nIf checked, plugin will try to autodetect VRAM size.\nBut if this appears wrong, please uncheck and set it to correct value.\n\n[Recommended: on]");
m_VramSize.Attach(GetDlgItem(IDC_SPIN_VRAM_SIZE));
m_VramSize.SetBuddy(GetDlgItem(IDC_TXT_VRAM_SIZE));
m_spinVRAM.Attach(GetDlgItem(IDC_TXT_VRAM_SIZE));
@ -307,14 +307,14 @@ public:
bool OnApply()
{
char spinVRAM[100];
wchar_t spinVRAM[100];
m_spinVRAM.GetWindowText(spinVRAM, sizeof(spinVRAM));
g_settings->SetScreenRes(m_WindowRes.GetCurSel());
g_settings->SetVsync(m_cbxVSync.GetCheck() == BST_CHECKED);
g_settings->SetTexenhOptions(m_cbxTextureSettings.GetCheck() == BST_CHECKED);
g_settings->SetFullScreenRes(m_cmbFSResolution.GetCurSel());
g_settings->SetWrpAnisotropic(m_cbxAnisotropic.GetCheck() == BST_CHECKED);
g_settings->SetWrpVRAM(m_cbxVRAM.GetCheck() == BST_CHECKED ? 0 : atoi(spinVRAM));
g_settings->SetWrpVRAM(m_cbxVRAM.GetCheck() == BST_CHECKED ? 0 : _wtoi(spinVRAM));
g_settings->SetWrpFBO(m_cbxFBO.GetCheck() == BST_CHECKED);
if (g_settings->dirty())
@ -336,7 +336,7 @@ private:
void AutoDetectChanged(void)
{
m_spinVRAM.SetWindowText(m_cbxVRAM.GetCheck() == BST_CHECKED ? " auto" : stdstr_f("%d", g_settings->wrpVRAM() != 0 ? g_settings->wrpVRAM() : 32).c_str());
m_spinVRAM.SetWindowText(m_cbxVRAM.GetCheck() == BST_CHECKED ? L" auto" : stdstr_f("%d", g_settings->wrpVRAM() != 0 ? g_settings->wrpVRAM() : 32).ToUTF16().c_str());
m_spinVRAM.EnableWindow(m_cbxVRAM.GetCheck() != BST_CHECKED);
m_VramSize.EnableWindow(m_cbxVRAM.GetCheck() != BST_CHECKED);
m_lblMb.EnableWindow(m_cbxVRAM.GetCheck() != BST_CHECKED);
@ -387,88 +387,88 @@ public:
if (g_romopen)
{
::SetWindowText(GetDlgItem(IDC_INFO), "Current game emulation settings. Change with care!");
::SetWindowText(GetDlgItem(IDC_INFO), L"Current game emulation settings. Change with care!");
}
else
{
::SetWindowText(GetDlgItem(IDC_INFO), "Default emulation settings. Not recommended to change!");
::SetWindowText(GetDlgItem(IDC_INFO), L"Default emulation settings. Not recommended to change!");
}
std::string tooltip = "Filtering mode:\n\nThere are three filtering modes possible:\n\n* Automatic filtering - filter exactly how the N64 specifies.\n* Point-sampled filtering - causes texels to appear square and sharp.\n* Bilinear filtering - interpolates the texture to make it appear more smooth.\n\n[Recommended: Automatic]";
std::wstring tooltip = L"Filtering mode:\n\nThere are three filtering modes possible:\n\n* Automatic filtering - filter exactly how the N64 specifies.\n* Point-sampled filtering - causes texels to appear square and sharp.\n* Bilinear filtering - interpolates the texture to make it appear more smooth.\n\n[Recommended: Automatic]";
TTSetTxt(IDC_TXT_FILTERING_MODE, tooltip.c_str());
TTSetTxt(IDC_CMB_FILTERING_MODE, tooltip.c_str());
m_cmbFiltering.Attach(GetDlgItem(IDC_CMB_FILTERING_MODE));
m_cmbFiltering.SetItemData(m_cmbFiltering.AddString("Automatic"), CSettings::Filter_Automatic);
m_cmbFiltering.SetItemData(m_cmbFiltering.AddString("Force Bilinear"), CSettings::Filter_ForceBilinear);
m_cmbFiltering.SetItemData(m_cmbFiltering.AddString("Force Point-sampled"), CSettings::Filter_ForcePointSampled);
m_cmbFiltering.SetItemData(m_cmbFiltering.AddString(L"Automatic"), CSettings::Filter_Automatic);
m_cmbFiltering.SetItemData(m_cmbFiltering.AddString(L"Force Bilinear"), CSettings::Filter_ForceBilinear);
m_cmbFiltering.SetItemData(m_cmbFiltering.AddString(L"Force Point-sampled"), CSettings::Filter_ForcePointSampled);
SetComboBoxIndex(m_cmbFiltering, (uint32_t)g_settings->filtering());
tooltip = "Buffer swapping method:\n\nThere are 3 buffer swapping methods:\n\n* old - swap buffers when vertical interrupt has occurred.\n* new - swap buffers when set of conditions is satisfied. Prevents flicker on some games.\n* hybrid - mix of first two methods. Can prevent even more flickering then previous method, but also can cause artefacts.\nIf you have flickering problems in a game (or graphics that don't show), try to change swapping method.\n\n[Recommended: new (hybrid for Paper Mario)]";
tooltip = L"Buffer swapping method:\n\nThere are 3 buffer swapping methods:\n\n* old - swap buffers when vertical interrupt has occurred.\n* new - swap buffers when set of conditions is satisfied. Prevents flicker on some games.\n* hybrid - mix of first two methods. Can prevent even more flickering then previous method, but also can cause artefacts.\nIf you have flickering problems in a game (or graphics that don't show), try to change swapping method.\n\n[Recommended: new (hybrid for Paper Mario)]";
TTSetTxt(IDC_TXT_BUFFER_SWAPPING, tooltip.c_str());
TTSetTxt(IDC_CMB_BUFFER_SWAPPING, tooltip.c_str());
m_cmbBufferSwap.Attach(GetDlgItem(IDC_CMB_BUFFER_SWAPPING));
m_cmbBufferSwap.SetItemData(m_cmbBufferSwap.AddString("Old"), CSettings::SwapMode_Old);
m_cmbBufferSwap.SetItemData(m_cmbBufferSwap.AddString("New"), CSettings::SwapMode_New);
m_cmbBufferSwap.SetItemData(m_cmbBufferSwap.AddString("Hybrid"), CSettings::SwapMode_Hybrid);
m_cmbBufferSwap.SetItemData(m_cmbBufferSwap.AddString(L"Old"), CSettings::SwapMode_Old);
m_cmbBufferSwap.SetItemData(m_cmbBufferSwap.AddString(L"New"), CSettings::SwapMode_New);
m_cmbBufferSwap.SetItemData(m_cmbBufferSwap.AddString(L"Hybrid"), CSettings::SwapMode_Hybrid);
SetComboBoxIndex(m_cmbBufferSwap, g_settings->swapmode());
tooltip = "Per-pixel level-of-detail calculation:\n\nN64 uses special mechanism for mip-mapping, which nearly impossible to reproduce correctly on PC hardware.\nThis option enables approximate emulation of this feature.\nFor example, it is required for the Peach/Bowser portrait's transition in Super Mario 64.\nThere are 3 modes:\n\n* off - LOD is not calculated\n* fast - fast imprecise LOD calculation.\n* precise - most precise LOD calculation possible, but more slow.\n\n[Recommended: your preference]";
tooltip = L"Per-pixel level-of-detail calculation:\n\nN64 uses special mechanism for mip-mapping, which nearly impossible to reproduce correctly on PC hardware.\nThis option enables approximate emulation of this feature.\nFor example, it is required for the Peach/Bowser portrait's transition in Super Mario 64.\nThere are 3 modes:\n\n* off - LOD is not calculated\n* fast - fast imprecise LOD calculation.\n* precise - most precise LOD calculation possible, but more slow.\n\n[Recommended: your preference]";
TTSetTxt(IDC_TXT_LOD_CALC, tooltip.c_str());
TTSetTxt(IDC_CMB_LOD_CALC, tooltip.c_str());
m_cmbLOD.Attach(GetDlgItem(IDC_CMB_LOD_CALC));
m_cmbLOD.SetItemData(m_cmbLOD.AddString("off"), CSettings::LOD_Off);
m_cmbLOD.SetItemData(m_cmbLOD.AddString("fast"), CSettings::LOD_Fast);
m_cmbLOD.SetItemData(m_cmbLOD.AddString("precise"), CSettings::LOD_Precise);
m_cmbLOD.SetItemData(m_cmbLOD.AddString(L"off"), CSettings::LOD_Off);
m_cmbLOD.SetItemData(m_cmbLOD.AddString(L"fast"), CSettings::LOD_Fast);
m_cmbLOD.SetItemData(m_cmbLOD.AddString(L"precise"), CSettings::LOD_Precise);
SetComboBoxIndex(m_cmbLOD, g_settings->lodmode());
tooltip = "Aspect ratio of the output:\n\nMost N64 games use 4:3 aspect ratio, but some support widescreen too.\nYou may select appropriate aspect here and set widescreen mode in game settings->\nIn \"Stretch\" mode the output will be stretched to the entire screen, other modes may add black borders if necessary";
tooltip = L"Aspect ratio of the output:\n\nMost N64 games use 4:3 aspect ratio, but some support widescreen too.\nYou may select appropriate aspect here and set widescreen mode in game settings->\nIn \"Stretch\" mode the output will be stretched to the entire screen, other modes may add black borders if necessary";
TTSetTxt(IDC_TXT_ASPECT_RATIO, tooltip.c_str());
TTSetTxt(IDC_CMB_ASPECT_RATIO, tooltip.c_str());
m_cmbAspect.Attach(GetDlgItem(IDC_CMB_ASPECT_RATIO));
m_cmbAspect.SetItemData(m_cmbAspect.AddString("4:3 (default)"), CSettings::Aspect_4x3);
m_cmbAspect.SetItemData(m_cmbAspect.AddString("Force 16:9"), CSettings::Aspect_16x9);
m_cmbAspect.SetItemData(m_cmbAspect.AddString("Stretch"), CSettings::Aspect_Stretch);
m_cmbAspect.SetItemData(m_cmbAspect.AddString("Original"), CSettings::Aspect_Original);
m_cmbAspect.SetItemData(m_cmbAspect.AddString(L"4:3 (default)"), CSettings::Aspect_4x3);
m_cmbAspect.SetItemData(m_cmbAspect.AddString(L"Force 16:9"), CSettings::Aspect_16x9);
m_cmbAspect.SetItemData(m_cmbAspect.AddString(L"Stretch"), CSettings::Aspect_Stretch);
m_cmbAspect.SetItemData(m_cmbAspect.AddString(L"Original"), CSettings::Aspect_Original);
SetComboBoxIndex(m_cmbAspect, (uint32_t)g_settings->aspectmode());
tooltip = "Fog enabled:\n\nSets fog emulation on//off.\n\n[Recommended: on]";
tooltip = L"Fog enabled:\n\nSets fog emulation on//off.\n\n[Recommended: on]";
TTSetTxt(IDC_CHK_FOG, tooltip.c_str());
m_cbxFog.Attach(GetDlgItem(IDC_CHK_FOG));
m_cbxFog.SetCheck(g_settings->fog() ? BST_CHECKED : BST_UNCHECKED);
tooltip = "Buffer clear on every frame:\n\nForces the frame buffer to be cleared every frame drawn.\nUsually frame buffer clear is controlled by the game.\nHowever, in some cases it is not well emulated, and some garbage may be left on the screen.\nIn such cases, this option must be set on.\n\n[Recommended: on]";
tooltip = L"Buffer clear on every frame:\n\nForces the frame buffer to be cleared every frame drawn.\nUsually frame buffer clear is controlled by the game.\nHowever, in some cases it is not well emulated, and some garbage may be left on the screen.\nIn such cases, this option must be set on.\n\n[Recommended: on]";
TTSetTxt(IDC_CHK_BUFFER_CLEAR, tooltip.c_str());
m_cbxBuffer.Attach(GetDlgItem(IDC_CHK_BUFFER_CLEAR));
m_cbxBuffer.SetCheck(g_settings->buff_clear() ? BST_CHECKED : BST_UNCHECKED);
m_cbxFBEnable.Attach(GetDlgItem(IDC_CHK_FRAME_BUFFER_EMULATION));
TTSetTxt(IDC_CHK_FRAME_BUFFER_EMULATION, "Enable frame buffer emulation:\n\nIf on, plugin will try to detect frame buffer usage and apply appropriate frame buffer emulation.\n\n[Recommended: on for games which use frame buffer effects]");
TTSetTxt(IDC_CHK_FRAME_BUFFER_EMULATION, L"Enable frame buffer emulation:\n\nIf on, plugin will try to detect frame buffer usage and apply appropriate frame buffer emulation.\n\n[Recommended: on for games which use frame buffer effects]");
m_cbxFBEnable.SetCheck(g_settings->fb_emulation_enabled() ? BST_CHECKED : BST_UNCHECKED);
m_cbxFBHWFBE.Attach(GetDlgItem(IDC_CHK_HARDWARE_FRAMEBUFFER));
TTSetTxt(IDC_CHK_HARDWARE_FRAMEBUFFER, "Enable hardware frame buffer emulation:\n\nIf this option is on, plugin will create auxiliary frame buffers in video memory instead of copying frame buffer content into main memory.\nThis allows plugin to run frame buffer effects without slowdown and without scaling image down to N64's native resolution.\nModern cards also fully support it.\n\n[Recommended: on, if supported by your hardware]");
TTSetTxt(IDC_CHK_HARDWARE_FRAMEBUFFER, L"Enable hardware frame buffer emulation:\n\nIf this option is on, plugin will create auxiliary frame buffers in video memory instead of copying frame buffer content into main memory.\nThis allows plugin to run frame buffer effects without slowdown and without scaling image down to N64's native resolution.\nModern cards also fully support it.\n\n[Recommended: on, if supported by your hardware]");
m_cbxFBHWFBE.SetCheck(g_settings->fb_hwfbe_set() ? BST_CHECKED : BST_UNCHECKED);
m_cbxFBGetFBI.Attach(GetDlgItem(IDC_CHK_GET_FRAMEBUFFER));
TTSetTxt(IDC_CHK_GET_FRAMEBUFFER, "Get information about frame buffers:\n\nThis is compatibility option. It must be set on for Mupen64 and off for 1964");
TTSetTxt(IDC_CHK_GET_FRAMEBUFFER, L"Get information about frame buffers:\n\nThis is compatibility option. It must be set on for Mupen64 and off for 1964");
m_cbxFBGetFBI.SetCheck(g_settings->fb_get_info_enabled() ? BST_CHECKED : BST_UNCHECKED);
m_cbxFBReadEveryFrame.Attach(GetDlgItem(IDC_CHK_READ_EVERY_FRAME));
TTSetTxt(IDC_CHK_READ_EVERY_FRAME, "Read every frame:\n\nIn some games plugin can't detect frame buffer usage.\nIn such cases you need to enable this option to see frame buffer effects.\nEvery drawn frame will be read from video card -> it works very slow.\n\n[Recommended: mostly off (needed only for a few games)]");
TTSetTxt(IDC_CHK_READ_EVERY_FRAME, L"Read every frame:\n\nIn some games plugin can't detect frame buffer usage.\nIn such cases you need to enable this option to see frame buffer effects.\nEvery drawn frame will be read from video card -> it works very slow.\n\n[Recommended: mostly off (needed only for a few games)]");
m_cbxFBReadEveryFrame.SetCheck(g_settings->fb_ref_enabled() ? BST_CHECKED : BST_UNCHECKED);
m_cbxFBasTex.Attach(GetDlgItem(IDC_RENDER_FRAME_AS_TEXTURE));
TTSetTxt(IDC_RENDER_FRAME_AS_TEXTURE, "Render N64 frame buffer as texture:\n\nWhen this option is enabled, content of each N64 frame buffer is rendered as texture over the frame, rendered by the plugin.\nThis prevents graphics lost, but may cause slowdowns and various glitches in some games.\n\n[Recommended: mostly off]");
TTSetTxt(IDC_RENDER_FRAME_AS_TEXTURE, L"Render N64 frame buffer as texture:\n\nWhen this option is enabled, content of each N64 frame buffer is rendered as texture over the frame, rendered by the plugin.\nThis prevents graphics lost, but may cause slowdowns and various glitches in some games.\n\n[Recommended: mostly off]");
m_cbxFBasTex.SetCheck(g_settings->fb_read_back_to_screen_enabled() ? BST_CHECKED : BST_UNCHECKED);
m_cbxDetect.Attach(GetDlgItem(IDC_CHK_DETECT_CPU_WRITE));
TTSetTxt(IDC_CHK_DETECT_CPU_WRITE, "Detect CPU write to the N64 frame buffer:\n\nThis option works as the previous options, but the plugin is trying to detect, when game uses CPU writes to N64 frame buffer.\nThe N64 frame buffer is rendered only when CPU writes is detected.\nUse this option for those games, in which you see still image or no image at all for some time with no reason.\n\n[Recommended: mostly off]");
TTSetTxt(IDC_CHK_DETECT_CPU_WRITE, L"Detect CPU write to the N64 frame buffer:\n\nThis option works as the previous options, but the plugin is trying to detect, when game uses CPU writes to N64 frame buffer.\nThe N64 frame buffer is rendered only when CPU writes is detected.\nUse this option for those games, in which you see still image or no image at all for some time with no reason.\n\n[Recommended: mostly off]");
m_cbxDetect.SetCheck(g_settings->fb_cpu_write_hack_enabled() ? BST_CHECKED : BST_UNCHECKED);
m_cbxFBDepthBuffer.Attach(GetDlgItem(IDC_SOFTWARE_DEPTH_BUFFER));
TTSetTxt(IDC_SOFTWARE_DEPTH_BUFFER, "Enable depth buffer rendering:\n\nThis option is used to fully emulate N64 depth buffer.\nIt is required for correct emulation of depth buffer based effects.\nHowever, it requires fast (>1GHz) CPU to work full speed.\n\n[Recommended: on for fast PC]");
TTSetTxt(IDC_SOFTWARE_DEPTH_BUFFER, L"Enable depth buffer rendering:\n\nThis option is used to fully emulate N64 depth buffer.\nIt is required for correct emulation of depth buffer based effects.\nHowever, it requires fast (>1GHz) CPU to work full speed.\n\n[Recommended: on for fast PC]");
m_cbxFBDepthBuffer.SetCheck(g_settings->fb_depth_render_enabled() ? BST_CHECKED : BST_UNCHECKED);
return TRUE;
}
@ -597,12 +597,12 @@ public:
for (size_t i = 0, n = sizeof(TraceCMB) / sizeof(TraceCMB[0]); i < n; i++)
{
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString("Error"), TraceError);
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString("Warning"), TraceWarning);
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString("Notice"), TraceNotice);
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString("Info"), TraceInfo);
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString("Debug"), TraceDebug);
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString("Verbose"), TraceVerbose);
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString(L"Error"), TraceError);
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString(L"Warning"), TraceWarning);
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString(L"Notice"), TraceNotice);
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString(L"Info"), TraceInfo);
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString(L"Debug"), TraceDebug);
TraceCMB[i].cmb.SetItemData(TraceCMB[i].cmb.AddString(L"Verbose"), TraceVerbose);
SetComboBoxIndex(TraceCMB[i].cmb, (uint32_t)GetSetting(TraceCMB[i].SettingId));
}
return TRUE;
@ -670,60 +670,60 @@ public:
TTInit();
TTSize(400);
std::string tooltip = "Filters:\n\nApply a filter to either smooth or sharpen textures.\nThere are 4 different smoothing filters and 2 different sharpening filters.\nThe higher the number, the stronger the effect,\ni.e. \"Smoothing filter 4\" will have a much more noticeable effect than \"Smoothing filter 1\".\nBe aware that performance may have an impact depending on the game and/or the PC.\n\n[Recommended: your preference]";
std::wstring tooltip = L"Filters:\n\nApply a filter to either smooth or sharpen textures.\nThere are 4 different smoothing filters and 2 different sharpening filters.\nThe higher the number, the stronger the effect,\ni.e. \"Smoothing filter 4\" will have a much more noticeable effect than \"Smoothing filter 1\".\nBe aware that performance may have an impact depending on the game and/or the PC.\n\n[Recommended: your preference]";
TTSetTxt(IDC_TXT_ENH_FILTER, tooltip.c_str());
TTSetTxt(IDC_CMB_ENH_FILTER, tooltip.c_str());
m_cmbEnhFilter.Attach(GetDlgItem(IDC_CMB_ENH_FILTER));
m_cmbEnhFilter.SetItemData(m_cmbEnhFilter.AddString("None"), CSettings::TextureFilter_None);
m_cmbEnhFilter.SetItemData(m_cmbEnhFilter.AddString("Smooth filtering 1"), CSettings::TextureFilter_SmoothFiltering);
m_cmbEnhFilter.SetItemData(m_cmbEnhFilter.AddString("Smooth filtering 2"), CSettings::TextureFilter_SmoothFiltering2);
m_cmbEnhFilter.SetItemData(m_cmbEnhFilter.AddString("Smooth filtering 3"), CSettings::TextureFilter_SmoothFiltering3);
m_cmbEnhFilter.SetItemData(m_cmbEnhFilter.AddString("Smooth filtering 4"), CSettings::TextureFilter_SmoothFiltering4);
m_cmbEnhFilter.SetItemData(m_cmbEnhFilter.AddString("Sharp filtering 1"), CSettings::TextureFilter_SharpFiltering1);
m_cmbEnhFilter.SetItemData(m_cmbEnhFilter.AddString("Sharp filtering 2"), CSettings::TextureFilter_SharpFiltering2);
m_cmbEnhFilter.SetItemData(m_cmbEnhFilter.AddString(L"None"), CSettings::TextureFilter_None);
m_cmbEnhFilter.SetItemData(m_cmbEnhFilter.AddString(L"Smooth filtering 1"), CSettings::TextureFilter_SmoothFiltering);
m_cmbEnhFilter.SetItemData(m_cmbEnhFilter.AddString(L"Smooth filtering 2"), CSettings::TextureFilter_SmoothFiltering2);
m_cmbEnhFilter.SetItemData(m_cmbEnhFilter.AddString(L"Smooth filtering 3"), CSettings::TextureFilter_SmoothFiltering3);
m_cmbEnhFilter.SetItemData(m_cmbEnhFilter.AddString(L"Smooth filtering 4"), CSettings::TextureFilter_SmoothFiltering4);
m_cmbEnhFilter.SetItemData(m_cmbEnhFilter.AddString(L"Sharp filtering 1"), CSettings::TextureFilter_SharpFiltering1);
m_cmbEnhFilter.SetItemData(m_cmbEnhFilter.AddString(L"Sharp filtering 2"), CSettings::TextureFilter_SharpFiltering2);
SetComboBoxIndex(m_cmbEnhFilter, g_settings->ghq_fltr());
tooltip = "Texture enhancement:\n\n7 different filters are selectable here, each one with a distinctive look.\nBe aware of possible performance impacts.\n\nIMPORTANT: 'Store' mode - saves textures in cache 'as is'.\nIt can improve performance in games, which load many textures.\nDisable 'Ignore backgrounds' option for better result.\n\n[Recommended: your preference]";
tooltip = L"Texture enhancement:\n\n7 different filters are selectable here, each one with a distinctive look.\nBe aware of possible performance impacts.\n\nIMPORTANT: 'Store' mode - saves textures in cache 'as is'.\nIt can improve performance in games, which load many textures.\nDisable 'Ignore backgrounds' option for better result.\n\n[Recommended: your preference]";
TTSetTxt(IDC_TXT_ENHANCEMENT, tooltip.c_str());
TTSetTxt(IDC_CMB_ENHANCEMENT, tooltip.c_str());
m_cmbEnhEnhancement.Attach(GetDlgItem(IDC_CMB_ENHANCEMENT));
m_cmbEnhEnhancement.SetItemData(m_cmbEnhEnhancement.AddString("None"), CSettings::TextureEnht_None);
m_cmbEnhEnhancement.SetItemData(m_cmbEnhEnhancement.AddString("X2"), CSettings::TextureEnht_X2);
m_cmbEnhEnhancement.SetItemData(m_cmbEnhEnhancement.AddString("X2SAI"), CSettings::TextureEnht_X2SAI);
m_cmbEnhEnhancement.SetItemData(m_cmbEnhEnhancement.AddString("HQ2X"), CSettings::TextureEnht_HQ2X);
m_cmbEnhEnhancement.SetItemData(m_cmbEnhEnhancement.AddString("HQ2XS"), CSettings::TextureEnht_HQ2XS);
m_cmbEnhEnhancement.SetItemData(m_cmbEnhEnhancement.AddString("LQ2X"), CSettings::TextureEnht_LQ2X);
m_cmbEnhEnhancement.SetItemData(m_cmbEnhEnhancement.AddString("LQ2XS"), CSettings::TextureEnht_LQ2XS);
m_cmbEnhEnhancement.SetItemData(m_cmbEnhEnhancement.AddString("HQ4X"), CSettings::TextureEnht_HQ4X);
m_cmbEnhEnhancement.SetItemData(m_cmbEnhEnhancement.AddString(L"None"), CSettings::TextureEnht_None);
m_cmbEnhEnhancement.SetItemData(m_cmbEnhEnhancement.AddString(L"X2"), CSettings::TextureEnht_X2);
m_cmbEnhEnhancement.SetItemData(m_cmbEnhEnhancement.AddString(L"X2SAI"), CSettings::TextureEnht_X2SAI);
m_cmbEnhEnhancement.SetItemData(m_cmbEnhEnhancement.AddString(L"HQ2X"), CSettings::TextureEnht_HQ2X);
m_cmbEnhEnhancement.SetItemData(m_cmbEnhEnhancement.AddString(L"HQ2XS"), CSettings::TextureEnht_HQ2XS);
m_cmbEnhEnhancement.SetItemData(m_cmbEnhEnhancement.AddString(L"LQ2X"), CSettings::TextureEnht_LQ2X);
m_cmbEnhEnhancement.SetItemData(m_cmbEnhEnhancement.AddString(L"LQ2XS"), CSettings::TextureEnht_LQ2XS);
m_cmbEnhEnhancement.SetItemData(m_cmbEnhEnhancement.AddString(L"HQ4X"), CSettings::TextureEnht_HQ4X);
SetComboBoxIndex(m_cmbEnhEnhancement, g_settings->ghq_enht());
tooltip = "Hi-res pack format:\n\nChoose which method is to be used for loading Hi-res texture packs.\nOnly Rice's format is available currently.\nLeave on \"None\" if you will not be needing to load hi-res packs.\n\n[Recommended: Rice's format. Default: \"None\"]";
tooltip = L"Hi-res pack format:\n\nChoose which method is to be used for loading Hi-res texture packs.\nOnly Rice's format is available currently.\nLeave on \"None\" if you will not be needing to load hi-res packs.\n\n[Recommended: Rice's format. Default: \"None\"]";
TTSetTxt(IDC_TXT_FORMAT_CHOICES, tooltip.c_str());
TTSetTxt(IDC_CMB_FORMAT_CHOICES, tooltip.c_str());
m_cmbHrsFormat.Attach(GetDlgItem(IDC_CMB_FORMAT_CHOICES));
m_cmbHrsFormat.SetItemData(m_cmbHrsFormat.AddString("None"), CSettings::HiResPackFormat_None);
m_cmbHrsFormat.SetItemData(m_cmbHrsFormat.AddString("Rice format"), CSettings::HiResPackFormat_Riceformat);
m_cmbHrsFormat.SetItemData(m_cmbHrsFormat.AddString(L"None"), CSettings::HiResPackFormat_None);
m_cmbHrsFormat.SetItemData(m_cmbHrsFormat.AddString(L"Rice format"), CSettings::HiResPackFormat_Riceformat);
SetComboBoxIndex(m_cmbHrsFormat, g_settings->ghq_hirs());
m_cmbTextureCompression.Attach(GetDlgItem(IDC_CMB_TEX_COMPRESS_MEHTOD));
m_cmbTextureCompression.SetItemData(m_cmbTextureCompression.AddString("S3TC"), CSettings::TextureCompression_S3TC);
m_cmbTextureCompression.SetItemData(m_cmbTextureCompression.AddString("FXT1"), CSettings::TextureCompression_FXT1);
m_cmbTextureCompression.SetItemData(m_cmbTextureCompression.AddString(L"S3TC"), CSettings::TextureCompression_S3TC);
m_cmbTextureCompression.SetItemData(m_cmbTextureCompression.AddString(L"FXT1"), CSettings::TextureCompression_FXT1);
SetComboBoxIndex(m_cmbTextureCompression, g_settings->ghq_cmpr());
tooltip = "Texture cache size:\n\nEnhanced and filtered textures can be cached to aid performance.\nThis setting will adjust how much PC memory will be dedicated for texture cache.\nThis helps boost performance if there are subsequent requests for the same texture (usually the case).\nNormally, 128MB should be more than enough but there is a sweet spot for each game.\nSuper Mario may not need more than 32megs, but Conker streams a lot of textures, so setting 256+ megs can boost performance.\nAdjust accordingly if you are encountering speed issues.\n'0' disables cache.\n\n[Recommended: PC and game dependant]";
tooltip = L"Texture cache size:\n\nEnhanced and filtered textures can be cached to aid performance.\nThis setting will adjust how much PC memory will be dedicated for texture cache.\nThis helps boost performance if there are subsequent requests for the same texture (usually the case).\nNormally, 128MB should be more than enough but there is a sweet spot for each game.\nSuper Mario may not need more than 32megs, but Conker streams a lot of textures, so setting 256+ megs can boost performance.\nAdjust accordingly if you are encountering speed issues.\n'0' disables cache.\n\n[Recommended: PC and game dependant]";
TTSetTxt(IDC_TXT_TEXTURE_CACHE, tooltip.c_str());
TTSetTxt(IDC_SPIN_TEXTURE_CACHE, tooltip.c_str());
TTSetTxt(IDC_TEXT_MB, tooltip.c_str());
m_textTexCache.Attach(GetDlgItem(IDC_TXT_TEXTURE_CACHE));
m_textTexCache.SetWindowTextA(stdstr_f("%d", g_settings->ghq_cache_size()).c_str());
m_textTexCache.SetWindowText(stdstr_f("%d", g_settings->ghq_cache_size()).ToUTF16().c_str());
m_spinEnhCacheSize.Attach(GetDlgItem(IDC_SPIN_TEXTURE_CACHE));
m_spinEnhCacheSize.SetBuddy(m_textTexCache);
TTSetTxt(IDC_CHK_IGNORE_BACKGROUND, "Ignore Backgrounds:\n\nIt is used to skip enhancement for long narrow textures, usually used for backgrounds.\nThis may save texture memory greatly and increase performance.\n\n[Recommended: on (off for 'Store' mode)]");
TTSetTxt(IDC_CHK_IGNORE_BACKGROUND, L"Ignore Backgrounds:\n\nIt is used to skip enhancement for long narrow textures, usually used for backgrounds.\nThis may save texture memory greatly and increase performance.\n\n[Recommended: on (off for 'Store' mode)]");
m_cbxEnhIgnoreBG.Attach(GetDlgItem(IDC_CHK_IGNORE_BACKGROUND));
m_cbxEnhIgnoreBG.SetCheck(g_settings->ghq_enht_nobg() ? BST_CHECKED : BST_UNCHECKED);
tooltip = "Texture compression:\n\nTextures will be compressed using selected texture compression method.\nThe overall compression ratio is about 1/6 for FXT1 and 1/4 for S3TC.\nIn addition to saving space on the texture cache, the space occupied on the GFX hardware's texture RAM, by the enhanced textures, will be greatly reduced.\nThis minimizes texture RAM usage, decreasing the number of texture swaps to the GFX hardware leading to performance gains.\nHowever, due to the nature of lossy compression of FXT1 and S3TC, using this option can sometimes lead to quality degradation of small size textures and color banding of gradient colored textures.\n\n[Recommended: off]";
tooltip = L"Texture compression:\n\nTextures will be compressed using selected texture compression method.\nThe overall compression ratio is about 1/6 for FXT1 and 1/4 for S3TC.\nIn addition to saving space on the texture cache, the space occupied on the GFX hardware's texture RAM, by the enhanced textures, will be greatly reduced.\nThis minimizes texture RAM usage, decreasing the number of texture swaps to the GFX hardware leading to performance gains.\nHowever, due to the nature of lossy compression of FXT1 and S3TC, using this option can sometimes lead to quality degradation of small size textures and color banding of gradient colored textures.\n\n[Recommended: off]";
TTSetTxt(IDC_CHK_TEX_COMPRESSION, tooltip.c_str());
TTSetTxt(IDC_CHK_HIRES_TEX_COMPRESSION, tooltip.c_str());
@ -732,24 +732,24 @@ public:
m_cbxHrsTexCompression.Attach(GetDlgItem(IDC_CHK_HIRES_TEX_COMPRESSION));
m_cbxHrsTexCompression.SetCheck(g_settings->ghq_hirs_cmpr() ? BST_CHECKED : BST_UNCHECKED);
TTSetTxt(IDC_CHK_COMPRESS_CACHE, "Compress texture cache:\n\nMemory will be compressed so that more textures can be held in the texture cache.\nThe compression ratio varies with each texture, but 1/5 of the original size would be a modest approximation.\nThey will be decompressed on-the-fly, before being downloaded to the gfx hardware.\nThis option will still help save memory space even when using texture compression.\n\n[Recommended: on]");
TTSetTxt(IDC_CHK_COMPRESS_CACHE, L"Compress texture cache:\n\nMemory will be compressed so that more textures can be held in the texture cache.\nThe compression ratio varies with each texture, but 1/5 of the original size would be a modest approximation.\nThey will be decompressed on-the-fly, before being downloaded to the gfx hardware.\nThis option will still help save memory space even when using texture compression.\n\n[Recommended: on]");
m_cbxEnhCompressCache.Attach(GetDlgItem(IDC_CHK_COMPRESS_CACHE));
m_cbxEnhCompressCache.SetCheck(g_settings->ghq_enht_gz() ? BST_CHECKED : BST_UNCHECKED);
m_cbxHrsTile.Attach(GetDlgItem(IDC_CHK_TILE_TEX));
TTSetTxt(IDC_CHK_TILE_TEX, "Tile textures:\n\nWhen on, wide texture will be split on several tiles to fit in one 256-width texture.\nThis tiled texture takes much less video memory space and thus overall performance will increase.\nHowever, corresponding polygons must be split too, and this is not polished yet - various issues are possible, including black lines and polygons distortions.\n\n[Recommended: off]");
TTSetTxt(IDC_CHK_TILE_TEX, L"Tile textures:\n\nWhen on, wide texture will be split on several tiles to fit in one 256-width texture.\nThis tiled texture takes much less video memory space and thus overall performance will increase.\nHowever, corresponding polygons must be split too, and this is not polished yet - various issues are possible, including black lines and polygons distortions.\n\n[Recommended: off]");
m_cbxHrsTile.SetCheck(g_settings->ghq_hirs_tile() ? BST_CHECKED : BST_UNCHECKED);
m_cbxHrsForce16.Attach(GetDlgItem(IDC_CHK_FORCE_16BPP_TEXT));
TTSetTxt(IDC_CHK_FORCE_16BPP_TEXT, "Force 16bpp textures:\n\nThe color of the textures will be reduced to 16bpp.\nThis is another space saver and performance enhancer.\nThis halves the space used on the texture cache and the GFX hardware's texture RAM.\nColor reduction is done so that the original quality is preserved as much as possible.\nDepending on the texture, this usually is hardly noticeable.\nSometimes though, it can be: skies are a good example.\n\n[Recommended: off]");
TTSetTxt(IDC_CHK_FORCE_16BPP_TEXT, L"Force 16bpp textures:\n\nThe color of the textures will be reduced to 16bpp.\nThis is another space saver and performance enhancer.\nThis halves the space used on the texture cache and the GFX hardware's texture RAM.\nColor reduction is done so that the original quality is preserved as much as possible.\nDepending on the texture, this usually is hardly noticeable.\nSometimes though, it can be: skies are a good example.\n\n[Recommended: off]");
m_cbxHrsForce16.SetCheck(g_settings->ghq_hirs_f16bpp() ? BST_CHECKED : BST_UNCHECKED);
m_cbxHrsTexEdit.Attach(GetDlgItem(IDC_CHK_TEX_DUMP_EDIT));
TTSetTxt(IDC_CHK_TEX_DUMP_EDIT, "Texture dumping mode:\n\nIn this mode, you have that ability to dump textures on screen to the appropriate folder.\nYou can also reload textures while the game is running to see how they look instantly - big time saver!\n\nHotkeys:\n\"R\" reloads hires textures from the texture pack\n\"D\" toggles texture dumps on/off.");
TTSetTxt(IDC_CHK_TEX_DUMP_EDIT, L"Texture dumping mode:\n\nIn this mode, you have that ability to dump textures on screen to the appropriate folder.\nYou can also reload textures while the game is running to see how they look instantly - big time saver!\n\nHotkeys:\n\"R\" reloads hires textures from the texture pack\n\"D\" toggles texture dumps on/off.");
m_cbxHrsTexEdit.SetCheck(g_settings->ghq_hirs_dump() ? BST_CHECKED : BST_UNCHECKED);
m_cbxHrsAltCRC.Attach(GetDlgItem(IDC_CHK_ALT_CRC));
TTSetTxt(IDC_CHK_ALT_CRC, "Alternative CRC calculation:\n\nThis option enables emulation of a palette CRC calculation bug in RiceVideo.\nIf some textures are not loaded, try to set this option on/off.\n\n[Recommended: texture pack dependant, mostly on]");
TTSetTxt(IDC_CHK_ALT_CRC, L"Alternative CRC calculation:\n\nThis option enables emulation of a palette CRC calculation bug in RiceVideo.\nIf some textures are not loaded, try to set this option on/off.\n\n[Recommended: texture pack dependant, mostly on]");
m_cbxHrsAltCRC.SetCheck(g_settings->ghq_hirs_altcrc() ? BST_CHECKED : BST_UNCHECKED);
if (g_settings->ghq_hirs_dump())
{
@ -757,27 +757,27 @@ public:
}
m_cbxHrsCompressCache.Attach(GetDlgItem(IDC_CHK_HRS_COMPRESS_CACHE));
TTSetTxt(IDC_CHK_HRS_COMPRESS_CACHE, "Compress texture cache:\n\nWhen game started, plugin loads all its hi-resolution textures into PC memory.\nSince hi-resolution textures are usually large, the whole pack can take hundreds megabytes of memory.\nCache compression allows save memory space greatly.\nTextures will be decompressed on-the-fly, before being downloaded to the gfx hardware.\nThis option will still help save memory space even when using texture compression.\n\n[Recommended: on]");
TTSetTxt(IDC_CHK_HRS_COMPRESS_CACHE, L"Compress texture cache:\n\nWhen game started, plugin loads all its hi-resolution textures into PC memory.\nSince hi-resolution textures are usually large, the whole pack can take hundreds megabytes of memory.\nCache compression allows save memory space greatly.\nTextures will be decompressed on-the-fly, before being downloaded to the gfx hardware.\nThis option will still help save memory space even when using texture compression.\n\n[Recommended: on]");
m_cbxHrsCompressCache.SetCheck(g_settings->ghq_hirs_gz() ? BST_CHECKED : BST_UNCHECKED);
m_cbxHrsLetFly.Attach(GetDlgItem(IDC_CHK_USE_ALPHA_FULLY));
TTSetTxt(IDC_CHK_USE_ALPHA_FULLY, "Use Alpha channel fully:\n\nWhen this option is off, 16bit rgba textures will be loaded using RiceVideo style, with 1bit for alpha channel.\nWhen it is on, GlideHQ will check, how alpha channel is used by the hires texture, and select most appropriate format for it.\nThis gives texture designers freedom to play with alpha, as they need, regardless of format of original N64 texture.\nFor older and badly designed texture packs it can cause unwanted black borders.\n\n[Recommended: texture pack dependant]");
TTSetTxt(IDC_CHK_USE_ALPHA_FULLY, L"Use Alpha channel fully:\n\nWhen this option is off, 16bit rgba textures will be loaded using RiceVideo style, with 1bit for alpha channel.\nWhen it is on, GlideHQ will check, how alpha channel is used by the hires texture, and select most appropriate format for it.\nThis gives texture designers freedom to play with alpha, as they need, regardless of format of original N64 texture.\nFor older and badly designed texture packs it can cause unwanted black borders.\n\n[Recommended: texture pack dependant]");
m_cbxHrsLetFly.SetCheck(g_settings->ghq_hirs_let_texartists_fly() ? BST_CHECKED : BST_UNCHECKED);
m_cbxSaveTexCache.Attach(GetDlgItem(IDC_CHK_TEX_CACHE_HD));
TTSetTxt(IDC_CHK_TEX_CACHE_HD, "Save texture cache to HD:\n\nFor enhanced textures cache:\nThis will save all previously loaded and enhanced textures to HD.\nSo upon next game launch, all the textures will be instantly loaded, resulting in smoother performance.\n\nFor high-resolution textures cache:\nAfter creation, loading hi-res texture will take only a few seconds upon game launch, as opposed to the 5 to 60 seconds a pack can take to load without this cache file.\nThe only downside here is upon any changes to the pack, the cache file will need to be manually deleted.\n\nSaved cache files go into a folder called \"Cache\" within the Textures folder.\n\n[Highly Recommended: on]");
TTSetTxt(IDC_CHK_TEX_CACHE_HD, L"Save texture cache to HD:\n\nFor enhanced textures cache:\nThis will save all previously loaded and enhanced textures to HD.\nSo upon next game launch, all the textures will be instantly loaded, resulting in smoother performance.\n\nFor high-resolution textures cache:\nAfter creation, loading hi-res texture will take only a few seconds upon game launch, as opposed to the 5 to 60 seconds a pack can take to load without this cache file.\nThe only downside here is upon any changes to the pack, the cache file will need to be manually deleted.\n\nSaved cache files go into a folder called \"Cache\" within the Textures folder.\n\n[Highly Recommended: on]");
m_cbxSaveTexCache.SetCheck(g_settings->ghq_cache_save() ? BST_CHECKED : BST_UNCHECKED);
return TRUE;
}
bool OnApply()
{
char texcache[100];
wchar_t texcache[100];
m_textTexCache.GetWindowText(texcache, sizeof(texcache));
g_settings->SetGhqFltr((CSettings::TextureFilter_t)m_cmbEnhFilter.GetItemData(m_cmbEnhFilter.GetCurSel()));
g_settings->SetGhqEnht((CSettings::TextureEnhancement_t)m_cmbEnhEnhancement.GetItemData(m_cmbEnhEnhancement.GetCurSel()));
g_settings->SetGhqCacheSize(atoi(texcache));
g_settings->SetGhqCacheSize(_wtoi(texcache));
g_settings->SetGhqEnhtNobg(m_cbxEnhIgnoreBG.GetCheck() == BST_CHECKED);
g_settings->SetGhqEnhtCmpr(m_cbxEnhTexCompression.GetCheck() == BST_CHECKED);
g_settings->SetGhqEnhtGz(m_cbxEnhCompressCache.GetCheck() == BST_CHECKED);
@ -901,7 +901,7 @@ void CALL DllConfig(void * hParent)
ZLUT_init();
}
COptionsSheet("Glide64 settings").DoModal((HWND)hParent);
COptionsSheet(L"Glide64 settings").DoModal((HWND)hParent);
CloseConfig();
#endif
}

View File

@ -373,7 +373,7 @@ void SetWindowDisplaySize(HWND hWnd)
g_windowedMenu = GetMenu(hWnd);
if (g_windowedMenu) SetMenu(hWnd, NULL);
HWND hStatusBar = FindWindowEx(hWnd, NULL, "msctls_statusbar32", NULL); // 1964
HWND hStatusBar = FindWindowEx(hWnd, NULL, L"msctls_statusbar32", NULL); // 1964
if (hStatusBar) ShowWindow(hStatusBar, SW_HIDE);
SetWindowLong(hWnd, GWL_STYLE, 0);
@ -390,7 +390,7 @@ void SetWindowDisplaySize(HWND hWnd)
HWND hStatusBar = FindWindowEx(hWnd, NULL, STATUSCLASSNAME, NULL);
if (hStatusBar == NULL)
{
hStatusBar = FindWindowEx(hWnd, NULL, "msctls_statusbar32", NULL);
hStatusBar = FindWindowEx(hWnd, NULL, L"msctls_statusbar32", NULL);
}
if (hToolBar != NULL)
{

View File

@ -46,9 +46,6 @@
<Manifest Condition="'$(PlatformToolset)'!='v90'">
<EnableDPIAwareness>true</EnableDPIAwareness>
</Manifest>
<ClCompile>
<PreprocessorDefinitions>UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="UserInterface\Debugger\CPULog.cpp" />

View File

@ -376,30 +376,6 @@ DWORD CALLBACK AboutIniBoxProc(HWND hDlg, DWORD uMsg, DWORD wParam, DWORD /*lPar
EnableWindow(GetDlgItem(hDlg, IDC_RDB_HOME), FALSE);
}
//Cheat
SetDlgItemTextW(hDlg, IDC_CHT, wGS(INI_CURRENT_CHT).c_str());
CIniFile CheatIniFile(g_Settings->LoadStringVal(SupportFile_Cheats).c_str());
wcsncpy(String, stdstr(CheatIniFile.GetString("Meta", "Author", "")).ToUTF16().c_str(), sizeof(String) / sizeof(String[0]));
if (wcslen(String) == 0)
{
EnableWindow(GetDlgItem(hDlg, IDC_CHT), FALSE);
EnableWindow(GetDlgItem(hDlg, IDC_CHT_AUTHOR), FALSE);
EnableWindow(GetDlgItem(hDlg, IDC_CHT_VERSION), FALSE);
EnableWindow(GetDlgItem(hDlg, IDC_CHT_DATE), FALSE);
EnableWindow(GetDlgItem(hDlg, IDC_CHT_HOME), FALSE);
}
set_about_field(hDlg, IDC_CHT_AUTHOR, wGS(INI_AUTHOR).c_str(), String);
wcsncpy(String, stdstr(CheatIniFile.GetString("Meta", "Version", "")).ToUTF16().c_str(), sizeof(String) / sizeof(String[0]));
set_about_field(hDlg, IDC_CHT_VERSION, wGS(INI_VERSION).c_str(), String);
wcsncpy(String, stdstr(CheatIniFile.GetString("Meta", "Date", "")).ToUTF16().c_str(), sizeof(String) / sizeof(String[0]));
set_about_field(hDlg, IDC_CHT_DATE, wGS(INI_DATE).c_str(), String);
wcsncpy(CHTHomePage, stdstr(CheatIniFile.GetString("Meta", "Homepage", "")).ToUTF16().c_str(), sizeof(CHTHomePage) / sizeof(CHTHomePage[0]));
SetDlgItemTextW(hDlg, IDC_CHT_HOME, wGS(INI_HOMEPAGE).c_str());
if (wcslen(CHTHomePage) == 0)
{
EnableWindow(GetDlgItem(hDlg, IDC_CHT_HOME), FALSE);
}
//Extended Info
SetDlgItemTextW(hDlg, IDC_RDX, wGS(INI_CURRENT_RDX).c_str());
CIniFile RdxIniFile(g_Settings->LoadStringVal(SupportFile_ExtInfo).c_str());
@ -430,7 +406,6 @@ DWORD CALLBACK AboutIniBoxProc(HWND hDlg, DWORD uMsg, DWORD wParam, DWORD /*lPar
switch (LOWORD(wParam))
{
case IDC_RDB_HOME: ShellExecuteW(NULL, L"open", RDBHomePage, NULL, NULL, SW_SHOWNORMAL); break;
case IDC_CHT_HOME: ShellExecuteW(NULL, L"open", CHTHomePage, NULL, NULL, SW_SHOWNORMAL); break;
case IDC_RDX_HOME: ShellExecuteW(NULL, L"open", RDXHomePage, NULL, NULL, SW_SHOWNORMAL); break;
case IDOK:
case IDCANCEL:

View File

@ -159,7 +159,7 @@ void DisplayError(char* Message, ...)
vsprintf( Msg, Message, ap );
va_end( ap );
#ifdef _WIN32
MessageBox(NULL, Msg, "Error", MB_OK | MB_ICONERROR);
MessageBoxA(NULL, Msg, "Error", MB_OK | MB_ICONERROR);
#else
fputs(&Msg[0], stderr);
#endif
@ -187,7 +187,7 @@ EXPORT void CloseDLL(void)
EXPORT void DllAbout(void * hParent)
{
#ifdef _WIN32
MessageBox((HWND)hParent, AboutMsg(), "About", MB_OK | MB_ICONINFORMATION);
MessageBoxA((HWND)hParent, AboutMsg(), "About", MB_OK | MB_ICONINFORMATION);
#else
puts(AboutMsg());
#endif
@ -454,7 +454,7 @@ void ProcessMenuItem(int ID)
}
break;
case ID_COMPILER:
DialogBox((HINSTANCE)hinstDLL, "RSPCOMPILER", HWND_DESKTOP, (DLGPROC)CompilerDlgProc);
DialogBoxA((HINSTANCE)hinstDLL, "RSPCOMPILER", HWND_DESKTOP, (DLGPROC)CompilerDlgProc);
break;
case ID_BREAKONSTARTOFTASK:
{
@ -628,7 +628,7 @@ BOOL CALLBACK CompilerDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM /*lPar
sprintf(Buffer, "x86: %2.2f KB / %2.2f KB", (float)(RecompPos - RecompCode) / 1024.0F,
pLastSecondary?(float)((pLastSecondary - RecompCodeSecondary) / 1024.0F):0);
SetDlgItemText(hDlg, IDC_COMPILER_BUFFERS, Buffer);
SetDlgItemTextA(hDlg, IDC_COMPILER_BUFFERS, Buffer);
break;
case WM_COMMAND:
switch (GET_WM_COMMAND_ID(wParam, lParam))

View File

@ -184,7 +184,7 @@ public:
}
}
ShellExecute(NULL,"open",LogFileName.c_str(),NULL,NULL,SW_SHOW);
ShellExecuteA(NULL,"open",LogFileName.c_str(),NULL,NULL,SW_SHOW);
ResetCounters();
}
};

View File

@ -925,11 +925,11 @@ bool GetDirectory( LPTSTR pszDirectory, WORD wDirID )
if (bReturn && wDirID == DIRECTORY_CONFIG)
{
strcat(pszDirectory,"Config\\");
wcscat(pszDirectory,L"Config\\");
}
if (bReturn && wDirID == DIRECTORY_LOG)
{
strcat(pszDirectory,"Logs\\");
wcscat(pszDirectory,L"Logs\\");
}
return bReturn;
}

View File

@ -318,12 +318,12 @@ bool InitXinput()
{
//Lets dynamically load in the XInput library
if (g_hXInputDLL == NULL)
g_hXInputDLL = LoadLibrary("Xinput1_4.dll");
g_hXInputDLL = LoadLibrary(L"Xinput1_4.dll");
if (g_hXInputDLL == NULL)
{
//Ok since 1.4 is present, try 9.1.0 as its present on Vista and newer
g_hXInputDLL = LoadLibrary("Xinput9_1_0.dll");
g_hXInputDLL = LoadLibrary(L"Xinput9_1_0.dll");
}
if (g_hXInputDLL == NULL)
{