NRage: Fix up some some unicode issues

This commit is contained in:
zilmar 2020-06-10 11:18:41 +09:30
parent 5e78937c16
commit 5087ae6ecd
3 changed files with 7 additions and 3 deletions

View File

@ -1105,8 +1105,8 @@ bool SaveLastBrowseDir( TCHAR *pszFileName, DWORD dwType )
// Handy, because it handles all our file type extensions for us. // Handy, because it handles all our file type extensions for us.
bool BrowseFile( HWND hDlg, TCHAR *pszFileName, DWORD dwType, bool fSave ) bool BrowseFile( HWND hDlg, TCHAR *pszFileName, DWORD dwType, bool fSave )
{ {
TCHAR pszFilter[DEFAULT_BUFFER]; TCHAR pszFilter[DEFAULT_BUFFER] = { 0 };
TCHAR pszTitle[DEFAULT_BUFFER]; TCHAR pszTitle[DEFAULT_BUFFER] = { 0 };
DWORD dwFlags = /*OFN_DONTADDTORECENT |*/ OFN_NOCHANGEDIR; DWORD dwFlags = /*OFN_DONTADDTORECENT |*/ OFN_NOCHANGEDIR;
dwFlags |= (fSave) ? OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT dwFlags |= (fSave) ? OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT
: OFN_HIDEREADONLY | OFN_FILEMUSTEXIST; : OFN_HIDEREADONLY | OFN_FILEMUSTEXIST;

View File

@ -35,6 +35,7 @@
#include "PakIO.h" #include "PakIO.h"
#include "Version.h" #include "Version.h"
#include "XInputController.h" #include "XInputController.h"
#include <Common\StdString.h>
// Prototypes // // Prototypes //
BOOL CALLBACK ControllerTabProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ); BOOL CALLBACK ControllerTabProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
@ -105,7 +106,7 @@ BOOL CALLBACK MainDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
TCHAR tszBuffer[DEFAULT_BUFFER], tszMsg[DEFAULT_BUFFER / 2]; TCHAR tszBuffer[DEFAULT_BUFFER], tszMsg[DEFAULT_BUFFER / 2];
LoadString( g_hResourceDLL, IDS_VERSTRING, tszBuffer, DEFAULT_BUFFER / 2); LoadString( g_hResourceDLL, IDS_VERSTRING, tszBuffer, DEFAULT_BUFFER / 2);
_stprintf(tszMsg, tszBuffer, VER_FILE_VERSION_STR); _stprintf(tszMsg, tszBuffer, stdstr(VER_FILE_VERSION_STR).ToUTF16().c_str());
SetDlgItemText( hDlg, IDC_VERSIONSTRING, tszMsg ); SetDlgItemText( hDlg, IDC_VERSIONSTRING, tszMsg );
} }

View File

@ -91,6 +91,9 @@
<ResourceCompile Include="NRagePluginV2.rc" /> <ResourceCompile Include="NRagePluginV2.rc" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Common\Common.vcxproj">
<Project>{b4a4b994-9111-42b1-93c2-6f1ca8bc4421}</Project>
</ProjectReference>
<ProjectReference Include="..\UpdateVersion\UpdateVersion.vcxproj"> <ProjectReference Include="..\UpdateVersion\UpdateVersion.vcxproj">
<Project>{1968162c-0793-491d-91a1-81645a24d399}</Project> <Project>{1968162c-0793-491d-91a1-81645a24d399}</Project>
</ProjectReference> </ProjectReference>