mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-11 14:42:05 +08:00
Merge 4281 update
This commit is contained in:
@@ -20,9 +20,9 @@ GNU General Public License for more details.
|
||||
#include "library.h"
|
||||
#include "filesystem.h"
|
||||
#include "server.h"
|
||||
#include "platform/android/android_lib.h"
|
||||
#include "platform/emscripten/em_lib.h"
|
||||
#include "platform/apple/ios_lib.h"
|
||||
#include "platform/android/lib_android.h"
|
||||
#include "platform/emscripten/lib_em.h"
|
||||
#include "platform/apple/lib_ios.h"
|
||||
|
||||
#ifdef XASH_NO_LIBDL
|
||||
#ifndef XASH_DLL_LOADER
|
||||
|
||||
@@ -69,7 +69,7 @@ qboolean SNDDMA_Init( void *hInst )
|
||||
|
||||
if( SDL_Init( SDL_INIT_AUDIO ) )
|
||||
{
|
||||
MsgDev( D_ERROR, "Audio: SDL: %s \n", SDL_GetError( ) );
|
||||
Con_Reportf( S_ERROR "Audio: SDL: %s \n", SDL_GetError( ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -297,21 +297,21 @@ static void WIN_SetDPIAwareness( void )
|
||||
|
||||
if( hResult == S_OK )
|
||||
{
|
||||
MsgDev( D_NOTE, "SetDPIAwareness: Success\n" );
|
||||
Con_Reportf( "SetDPIAwareness: Success\n" );
|
||||
bSuccess = TRUE;
|
||||
}
|
||||
else if( hResult == E_INVALIDARG ) MsgDev( D_NOTE, "SetDPIAwareness: Invalid argument\n" );
|
||||
else if( hResult == E_ACCESSDENIED ) MsgDev( D_NOTE, "SetDPIAwareness: Access Denied\n" );
|
||||
else if( hResult == E_INVALIDARG ) Con_Reportf( "SetDPIAwareness: Invalid argument\n" );
|
||||
else if( hResult == E_ACCESSDENIED ) Con_Reportf( "SetDPIAwareness: Access Denied\n" );
|
||||
}
|
||||
else MsgDev( D_NOTE, "SetDPIAwareness: Can't get SetProcessDpiAwareness\n" );
|
||||
else Con_Reportf( "SetDPIAwareness: Can't get SetProcessDpiAwareness\n" );
|
||||
FreeLibrary( hModule );
|
||||
}
|
||||
else MsgDev( D_NOTE, "SetDPIAwareness: Can't load shcore.dll\n" );
|
||||
else Con_Reportf( "SetDPIAwareness: Can't load shcore.dll\n" );
|
||||
|
||||
|
||||
if( !bSuccess )
|
||||
{
|
||||
MsgDev( D_NOTE, "SetDPIAwareness: Trying SetProcessDPIAware...\n" );
|
||||
Con_Reportf( "SetDPIAwareness: Trying SetProcessDPIAware...\n" );
|
||||
|
||||
if( ( hModule = LoadLibrary( "user32.dll" ) ) )
|
||||
{
|
||||
@@ -322,15 +322,15 @@ static void WIN_SetDPIAwareness( void )
|
||||
|
||||
if( hResult )
|
||||
{
|
||||
MsgDev( D_NOTE, "SetDPIAwareness: Success\n" );
|
||||
Con_Reportf( "SetDPIAwareness: Success\n" );
|
||||
bSuccess = TRUE;
|
||||
}
|
||||
else MsgDev( D_NOTE, "SetDPIAwareness: fail\n" );
|
||||
else Con_Reportf( "SetDPIAwareness: fail\n" );
|
||||
}
|
||||
else MsgDev( D_NOTE, "SetDPIAwareness: Can't get SetProcessDPIAware\n" );
|
||||
else Con_Reportf( "SetDPIAwareness: Can't get SetProcessDPIAware\n" );
|
||||
FreeLibrary( hModule );
|
||||
}
|
||||
else MsgDev( D_NOTE, "SetDPIAwareness: Can't load user32.dll\n" );
|
||||
else Con_Reportf( "SetDPIAwareness: Can't load user32.dll\n" );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -384,7 +384,7 @@ void *GL_GetProcAddress( const char *name )
|
||||
|
||||
if( !func )
|
||||
{
|
||||
MsgDev( D_ERROR, "Error: GL_GetProcAddress failed for %s\n", name );
|
||||
Con_Reportf( S_ERROR "Error: GL_GetProcAddress failed for %s\n", name );
|
||||
}
|
||||
|
||||
return func;
|
||||
@@ -401,7 +401,7 @@ void GL_UpdateSwapInterval( void )
|
||||
if( cls.state < ca_active )
|
||||
{
|
||||
if( SDL_GL_SetSwapInterval( gl_vsync->value ) )
|
||||
MsgDev( D_ERROR, "SDL_GL_SetSwapInterval: %s\n", SDL_GetError( ) );
|
||||
Con_Reportf( S_ERROR "SDL_GL_SetSwapInterval: %s\n", SDL_GetError( ) );
|
||||
SetBits( gl_vsync->flags, FCVAR_CHANGED );
|
||||
}
|
||||
else if( FBitSet( gl_vsync->flags, FCVAR_CHANGED ))
|
||||
@@ -409,7 +409,7 @@ void GL_UpdateSwapInterval( void )
|
||||
ClearBits( gl_vsync->flags, FCVAR_CHANGED );
|
||||
|
||||
if( SDL_GL_SetSwapInterval( gl_vsync->value ) )
|
||||
MsgDev( D_ERROR, "SDL_GL_SetSwapInterval: %s\n", SDL_GetError( ) );
|
||||
Con_Reportf( S_ERROR "SDL_GL_SetSwapInterval: %s\n", SDL_GetError( ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -584,7 +584,7 @@ qboolean VID_CreateWindow( int width, int height, qboolean fullscreen )
|
||||
|
||||
if( !host.hWnd )
|
||||
{
|
||||
MsgDev( D_ERROR, "VID_CreateWindow: couldn't create '%s': %s\n", wndname, SDL_GetError());
|
||||
Con_Reportf( S_ERROR "VID_CreateWindow: couldn't create '%s': %s\n", wndname, SDL_GetError());
|
||||
|
||||
// remove MSAA, if it present, because
|
||||
// window creating may fail on GLX visual choose
|
||||
@@ -735,7 +735,7 @@ static void GL_SetupAttributes( void )
|
||||
#ifndef XASH_GL_STATIC
|
||||
if( Sys_CheckParm( "-gldebug" ) )
|
||||
{
|
||||
MsgDev( D_NOTE, "Creating an extended GL context for debug...\n" );
|
||||
Con_Reportf( "Creating an extended GL context for debug...\n" );
|
||||
SetBits( context_flags, FCONTEXT_DEBUG_ARB );
|
||||
SDL_GL_SetAttribute( SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG );
|
||||
glw_state.extended = true;
|
||||
@@ -861,7 +861,7 @@ qboolean R_Init_Video( void )
|
||||
|
||||
if( SDL_GL_LoadLibrary( EGL_LIB ) )
|
||||
{
|
||||
MsgDev( D_ERROR, "Couldn't initialize OpenGL: %s\n", SDL_GetError());
|
||||
Con_Reportf( S_ERROR "Couldn't initialize OpenGL: %s\n", SDL_GetError());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1073,7 +1073,7 @@ void GL_InitExtensionsBigGL()
|
||||
{
|
||||
if( host_developer.value )
|
||||
{
|
||||
MsgDev( D_NOTE, "Installing GL_DebugOutput...\n");
|
||||
Con_Reportf( "Installing GL_DebugOutput...\n");
|
||||
pglDebugMessageCallbackARB( GL_DebugOutput, NULL );
|
||||
|
||||
// force everything to happen in the main thread instead of in a separate driver thread
|
||||
@@ -1231,21 +1231,21 @@ qboolean VID_SetMode( void )
|
||||
if( err == rserr_invalid_fullscreen )
|
||||
{
|
||||
Cvar_SetValue( "fullscreen", 0 );
|
||||
MsgDev( D_ERROR, "VID_SetMode: fullscreen unavailable in this mode\n" );
|
||||
Con_Reportf( S_ERROR "VID_SetMode: fullscreen unavailable in this mode\n" );
|
||||
Sys_Warn("fullscreen unavailable in this mode!");
|
||||
if(( err = R_ChangeDisplaySettings( iScreenWidth, iScreenHeight, false )) == rserr_ok )
|
||||
return true;
|
||||
}
|
||||
else if( err == rserr_invalid_mode )
|
||||
{
|
||||
MsgDev( D_ERROR, "VID_SetMode: invalid mode\n" );
|
||||
Con_Reportf( S_ERROR "VID_SetMode: invalid mode\n" );
|
||||
Sys_Warn( "invalid mode" );
|
||||
}
|
||||
|
||||
// try setting it back to something safe
|
||||
if(( err = R_ChangeDisplaySettings( glConfig.prev_width, glConfig.prev_height, false )) != rserr_ok )
|
||||
{
|
||||
MsgDev( D_ERROR, "VID_SetMode: could not revert to safe mode\n" );
|
||||
Con_Reportf( S_ERROR "VID_SetMode: could not revert to safe mode\n" );
|
||||
Sys_Warn("could not revert to safe mode!");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ void Wcon_CreateConsole( void )
|
||||
if( !RegisterClass( &wc ))
|
||||
{
|
||||
// print into log
|
||||
MsgDev( D_ERROR, "Can't register window class '%s'\n", SYSCONSOLE );
|
||||
Con_Reportf( S_ERROR "Can't register window class '%s'\n", SYSCONSOLE );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ void Wcon_CreateConsole( void )
|
||||
s_wcd.hWnd = CreateWindowEx( WS_EX_DLGMODALFRAME, SYSCONSOLE, s_wcd.title, DEDSTYLE, ( swidth - 600 ) / 2, ( sheight - 450 ) / 2 , rect.right - rect.left + 1, rect.bottom - rect.top + 1, NULL, NULL, host.hInst, NULL );
|
||||
if( s_wcd.hWnd == NULL )
|
||||
{
|
||||
MsgDev( D_ERROR, "Can't create window '%s'\n", s_wcd.title );
|
||||
Con_Reportf( S_ERROR "Can't create window '%s'\n", s_wcd.title );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -397,7 +397,7 @@ destroy win32 console
|
||||
void Wcon_DestroyConsole( void )
|
||||
{
|
||||
// last text message into console or log
|
||||
MsgDev( D_NOTE, "Sys_FreeLibrary: Unloading xash.dll\n" );
|
||||
Con_Reportf( "Sys_FreeLibrary: Unloading xash.dll\n" );
|
||||
|
||||
Sys_CloseLog();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user