1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-06-25 22:09:35 +00:00

Switch to Unicode strings.

This commit is contained in:
Sergey Lipskiy 2015-04-25 18:05:54 +06:00
parent 277807fbf4
commit a70a92f752
5 changed files with 13 additions and 14 deletions

View File

@ -113,7 +113,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>TXFILTER_LIB;WIN32_ASM;OS_WINDOWS;_USRDLL;NEWGLNINTENDO64_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>UNICODE;TXFILTER_LIB;WIN32_ASM;OS_WINDOWS;_USRDLL;NEWGLNINTENDO64_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
@ -140,7 +140,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_mupenplus|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>TXFILTER_LIB;MUPENPLUSAPI;WIN32;OS_WINDOWS;_USRDLL;NEWGLNINTENDO64_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>UNICODE;TXFILTER_LIB;MUPENPLUSAPI;WIN32;OS_WINDOWS;_USRDLL;NEWGLNINTENDO64_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
@ -171,7 +171,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<PreprocessorDefinitions>TXFILTER_LIB;WIN32_ASM;OS_WINDOWS;_USRDLL;NEWGLNINTENDO64_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>UNICODE;TXFILTER_LIB;WIN32_ASM;OS_WINDOWS;_USRDLL;NEWGLNINTENDO64_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
@ -202,7 +202,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<PreprocessorDefinitions>TXFILTER_LIB;MUPENPLUSAPI;WIN32;WIN32_ASM;OS_WINDOWS;_USRDLL;NEWGLNINTENDO64_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>UNICODE;TXFILTER_LIB;MUPENPLUSAPI;WIN32;WIN32_ASM;OS_WINDOWS;_USRDLL;NEWGLNINTENDO64_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>

View File

@ -1,2 +1,3 @@
char pluginName[] = "GLideN64";
wchar_t pluginNameW[] = L"GLideN64";
void (*CheckInterrupts)( void );

View File

@ -2,6 +2,7 @@
#define GLIDEN64_H
extern char pluginName[];
extern wchar_t pluginNameW[];
extern void (*CheckInterrupts)( void );
#endif // GLIDEN64_H

View File

@ -35,10 +35,7 @@ void PluginAPI::FindPluginPath(wchar_t * _strPath)
if (_strPath == NULL)
return;
#ifdef OS_WINDOWS
TCHAR strDLLPath[PLUGIN_PATH_SIZE];
memset(strDLLPath, 0, sizeof(strDLLPath));
::GetModuleFileName((HINSTANCE)&__ImageBase, strDLLPath, PLUGIN_PATH_SIZE);
::mbstowcs(_strPath, strDLLPath, PLUGIN_PATH_SIZE);
::GetModuleFileName((HINSTANCE)&__ImageBase, _strPath, PLUGIN_PATH_SIZE);
#else
// TODO: for other OS
return;

View File

@ -58,30 +58,30 @@ bool OGLVideoWindows::_start()
hWnd = GetActiveWindow();
if ((hDC = GetDC( hWnd )) == NULL) {
MessageBox( hWnd, "Error while getting a device context!", pluginName, MB_ICONERROR | MB_OK );
MessageBox( hWnd, L"Error while getting a device context!", pluginNameW, MB_ICONERROR | MB_OK );
return false;
}
if ((pixelFormat = ChoosePixelFormat(hDC, &pfd )) == 0) {
MessageBox( hWnd, "Unable to find a suitable pixel format!", pluginName, MB_ICONERROR | MB_OK );
MessageBox( hWnd, L"Unable to find a suitable pixel format!", pluginNameW, MB_ICONERROR | MB_OK );
_stop();
return false;
}
if ((SetPixelFormat(hDC, pixelFormat, &pfd )) == FALSE) {
MessageBox( hWnd, "Error while setting pixel format!", pluginName, MB_ICONERROR | MB_OK );
MessageBox( hWnd, L"Error while setting pixel format!", pluginNameW, MB_ICONERROR | MB_OK );
_stop();
return false;
}
if ((hRC = wglCreateContext(hDC)) == NULL) {
MessageBox( hWnd, "Error while creating OpenGL context!", pluginName, MB_ICONERROR | MB_OK );
MessageBox( hWnd, L"Error while creating OpenGL context!", pluginNameW, MB_ICONERROR | MB_OK );
_stop();
return false;
}
if ((wglMakeCurrent(hDC, hRC)) == FALSE) {
MessageBox( hWnd, "Error while making OpenGL context current!", pluginName, MB_ICONERROR | MB_OK );
MessageBox( hWnd, L"Error while making OpenGL context current!", pluginNameW, MB_ICONERROR | MB_OK );
_stop();
return false;
}
@ -143,7 +143,7 @@ void OGLVideoWindows::_changeWindow()
fullscreenMode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY;
if (ChangeDisplaySettings( &fullscreenMode, CDS_FULLSCREEN ) != DISP_CHANGE_SUCCESSFUL) {
MessageBox( NULL, "Failed to change display mode", pluginName, MB_ICONERROR | MB_OK );
MessageBox( NULL, L"Failed to change display mode", pluginNameW, MB_ICONERROR | MB_OK );
return;
}