engine: platform: Make R_Init_Video parameter an enum

This commit is contained in:
lewa_j
2026-01-13 03:25:29 +03:00
parent 72e8a53046
commit 543d6d67e6
8 changed files with 11 additions and 10 deletions
+1 -1
View File
@@ -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());
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+2 -1
View File
@@ -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 );
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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
View File
@@ -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