mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-09 13:51:45 +08:00
engine: platform: Make R_Init_Video parameter an enum
This commit is contained in:
@@ -313,7 +313,7 @@ static screenfade_t *pfnRefGetScreenFade( void )
|
||||
return &clgame.fade;
|
||||
}
|
||||
|
||||
static qboolean R_Init_Video_( const int type )
|
||||
static qboolean R_Init_Video_( ref_graphic_apis_t type )
|
||||
{
|
||||
host.apply_opengl_config = true;
|
||||
Cbuf_AddTextf( "exec %s.cfg\n", ref.dllFuncs.R_GetConfigName());
|
||||
|
||||
@@ -49,7 +49,7 @@ static void DOS_GetScreenRes( int *x, int *y )
|
||||
*y = 200;
|
||||
}
|
||||
|
||||
qboolean R_Init_Video( const int type )
|
||||
qboolean R_Init_Video( ref_graphic_apis_t type )
|
||||
{
|
||||
qboolean retval;
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ void FB_GetScreenRes( int *x, int *y )
|
||||
*y = fb.vinfo.yres;
|
||||
}
|
||||
|
||||
qboolean R_Init_Video( const int type )
|
||||
qboolean R_Init_Video( ref_graphic_apis_t type )
|
||||
{
|
||||
qboolean retval;
|
||||
string fbdev = DEFAULT_FBDEV;
|
||||
|
||||
@@ -320,9 +320,10 @@ typedef enum
|
||||
struct vidmode_s;
|
||||
typedef enum window_mode_e window_mode_t;
|
||||
typedef enum ref_window_type_e ref_window_type_t;
|
||||
typedef enum ref_graphic_apis_e ref_graphic_apis_t;
|
||||
|
||||
// Window
|
||||
qboolean R_Init_Video( const int type );
|
||||
qboolean R_Init_Video( ref_graphic_apis_t type );
|
||||
void R_Free_Video( void );
|
||||
qboolean VID_SetMode( void );
|
||||
rserr_t R_ChangeDisplaySettings( int width, int height, window_mode_t window_mode );
|
||||
|
||||
@@ -377,7 +377,7 @@ int GL_GetAttribute( int attr, int *val )
|
||||
R_Init_Video
|
||||
==================
|
||||
*/
|
||||
qboolean R_Init_Video( const int type )
|
||||
qboolean R_Init_Video( ref_graphic_apis_t type )
|
||||
{
|
||||
string safe;
|
||||
qboolean retval;
|
||||
|
||||
@@ -987,7 +987,7 @@ int GL_GetAttribute( int attr, int *val )
|
||||
R_Init_Video
|
||||
==================
|
||||
*/
|
||||
qboolean R_Init_Video( const int type )
|
||||
qboolean R_Init_Video( ref_graphic_apis_t type )
|
||||
{
|
||||
string safe;
|
||||
SDL_DisplayMode displayMode;
|
||||
|
||||
@@ -270,7 +270,7 @@ void GL_UpdateSwapInterval( void )
|
||||
}
|
||||
}
|
||||
|
||||
qboolean R_Init_Video( const int type )
|
||||
qboolean R_Init_Video( ref_graphic_apis_t type )
|
||||
{
|
||||
qboolean retval = false;
|
||||
|
||||
|
||||
+3
-3
@@ -220,12 +220,12 @@ enum ref_defaultsprite_e
|
||||
|
||||
// the order of first three is important!
|
||||
// so you can use this value in IEngineStudio.StudioIsHardware
|
||||
enum ref_graphic_apis_e
|
||||
typedef enum ref_graphic_apis_e
|
||||
{
|
||||
REF_SOFTWARE, // hypothetical: just make a surface to draw on, in software
|
||||
REF_GL, // create GL context
|
||||
REF_D3D, // Direct3D
|
||||
};
|
||||
} ref_graphic_apis_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
@@ -447,7 +447,7 @@ typedef struct ref_api_s
|
||||
// video init
|
||||
// try to create window
|
||||
// will call GL_SetupAttributes in case of REF_GL
|
||||
qboolean (*R_Init_Video)( int type ); // will also load and execute renderer config(see R_GetConfigName)
|
||||
qboolean (*R_Init_Video)( ref_graphic_apis_t type ); // will also load and execute renderer config(see R_GetConfigName)
|
||||
void (*R_Free_Video)( void );
|
||||
|
||||
// GL
|
||||
|
||||
Reference in New Issue
Block a user