Skip to content

Commit

Permalink
Remove legacy command interface from renderer interface
Browse files Browse the repository at this point in the history
  • Loading branch information
slipher committed Jan 18, 2025
1 parent ac2b4dc commit 26866fb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 20 deletions.
6 changes: 0 additions & 6 deletions src/engine/client/cl_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2219,12 +2219,6 @@ static bool CL_InitRef()
refimport_t ri;
refexport_t *ret;

ri.Cmd_AddCommand = Cmd_AddCommand;
ri.Cmd_RemoveCommand = Cmd_RemoveCommand;
ri.Cmd_Argc = Cmd_Argc;
ri.Cmd_Argv = Cmd_Argv;
ri.Cmd_QuoteString = Cmd_QuoteString;

ri.Milliseconds = Sys::Milliseconds;
ri.RealTime = Com_RealTime;

Expand Down
8 changes: 0 additions & 8 deletions src/engine/renderer/tr_public.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,14 +293,6 @@ struct refimport_t
void *( *Hunk_AllocateTempMemory )( int size );
void ( *Hunk_FreeTempMemory )( void *block );

void ( *Cmd_AddCommand )( const char *name, void ( *cmd )() );
void ( *Cmd_RemoveCommand )( const char *name );

int ( *Cmd_Argc )();
const char *( *Cmd_Argv )( int i );

const char *( *Cmd_QuoteString )( const char *text );

// a -1 return means the file does not exist
// nullptr can be passed for buf to just determine existence
int ( *FS_ReadFile )( const char *name, void **buf );
Expand Down
9 changes: 3 additions & 6 deletions src/engine/sys/sdl_glimp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,10 +500,9 @@ void GLimp_Shutdown()
ResetStruct( glState );
}

static void GLimp_Minimize()
{
SDL_MinimizeWindow( window );
}
static Cmd::LambdaCmd minimizeCmd(
"minimize", "minimize the window",
[]( const Cmd::Args & ) { SDL_MinimizeWindow( window ); });

static void SetSwapInterval( int swapInterval )
{
Expand Down Expand Up @@ -2655,8 +2654,6 @@ bool GLimp_Init()
Cvar::Latch( workaround_glExtension_missingArbFbo_useExtFbo );
Cvar::Latch( workaround_glHardware_intel_useFirstProvokinVertex );

ri.Cmd_AddCommand( "minimize", GLimp_Minimize );

/* Enable S3TC on Mesa even if libtxc-dxtn is not available
The environment variables is currently always set,
it should do nothing with other systems and drivers.
Expand Down

0 comments on commit 26866fb

Please sign in to comment.