mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: partial fix to explicitly call ascii or wide Win32 API function calls
This commit is contained in:
@@ -365,10 +365,10 @@ static int ID_GetKeyData( HKEY hRootKey, char *subKey, char *value, LPBYTE data,
|
||||
{
|
||||
HKEY hKey;
|
||||
|
||||
if( RegOpenKeyEx( hRootKey, subKey, 0, KEY_QUERY_VALUE, &hKey ) != ERROR_SUCCESS )
|
||||
if( RegOpenKeyExA( hRootKey, subKey, 0, KEY_QUERY_VALUE, &hKey ) != ERROR_SUCCESS )
|
||||
return 0;
|
||||
|
||||
if( RegQueryValueEx( hKey, value, NULL, NULL, data, &cbData ) != ERROR_SUCCESS )
|
||||
if( RegQueryValueExA( hKey, value, NULL, NULL, data, &cbData ) != ERROR_SUCCESS )
|
||||
{
|
||||
RegCloseKey( hKey );
|
||||
return 0;
|
||||
@@ -377,13 +377,14 @@ static int ID_GetKeyData( HKEY hRootKey, char *subKey, char *value, LPBYTE data,
|
||||
RegCloseKey( hKey );
|
||||
return 1;
|
||||
}
|
||||
static int ID_SetKeyData( HKEY hRootKey, char *subKey, DWORD dwType, char *value, LPBYTE data, DWORD cbData)
|
||||
|
||||
static int ID_SetKeyData( HKEY hRootKey, char *subKey, DWORD dwType, char *value, LPBYTE data, DWORD cbData )
|
||||
{
|
||||
HKEY hKey;
|
||||
if( RegCreateKey( hRootKey, subKey, &hKey ) != ERROR_SUCCESS )
|
||||
if( RegCreateKeyA( hRootKey, subKey, &hKey ) != ERROR_SUCCESS )
|
||||
return 0;
|
||||
|
||||
if( RegSetValueEx( hKey, value, 0, dwType, data, cbData ) != ERROR_SUCCESS )
|
||||
if( RegSetValueExA( hKey, value, 0, dwType, data, cbData ) != ERROR_SUCCESS )
|
||||
{
|
||||
RegCloseKey( hKey );
|
||||
return 0;
|
||||
|
||||
@@ -45,7 +45,7 @@ void Platform_Sleep( int msec )
|
||||
|
||||
void Win32_Init( qboolean con_showalways )
|
||||
{
|
||||
HMODULE hModule = LoadLibrary( "kernel32.dll" );
|
||||
HMODULE hModule = LoadLibraryW( L"kernel32.dll" );
|
||||
if( hModule )
|
||||
{
|
||||
HANDLE ( __stdcall *pfnCreateWaitableTimerExW)( LPSECURITY_ATTRIBUTES lpTimerAttributes, LPCWSTR lpTimerName, DWORD dwFlags, DWORD dwDesiredAccess );
|
||||
@@ -114,13 +114,13 @@ void Platform_ShellExecute( const char *path, const char *parms )
|
||||
if( !Q_strcmp( path, GENERIC_UPDATE_PAGE ) || !Q_strcmp( path, PLATFORM_UPDATE_PAGE ))
|
||||
path = DEFAULT_UPDATE_PAGE;
|
||||
|
||||
ShellExecute( NULL, "open", path, parms, NULL, SW_SHOW );
|
||||
ShellExecuteA( NULL, "open", path, parms, NULL, SW_SHOW );
|
||||
}
|
||||
|
||||
#if XASH_MESSAGEBOX == MSGBOX_WIN32
|
||||
void Platform_MessageBox( const char *title, const char *message, qboolean parentMainWindow )
|
||||
{
|
||||
MessageBox( parentMainWindow ? host.hWnd : NULL, message, title, MB_OK|MB_SETFOREGROUND|MB_ICONSTOP );
|
||||
MessageBoxA( parentMainWindow ? host.hWnd : NULL, message, title, MB_OK|MB_SETFOREGROUND|MB_ICONSTOP );
|
||||
}
|
||||
#endif // XASH_MESSAGEBOX == MSGBOX_WIN32
|
||||
|
||||
|
||||
Reference in New Issue
Block a user