- Reiße das Clipboard raus, funktionierte eh nicht

- Entferne weiteren toten Code
This commit is contained in:
Yamagi Burmeister 2010-10-19 08:34:59 +00:00
parent 68135136bc
commit 7edacb5638
5 changed files with 1 additions and 85 deletions

3
TODO
View file

@ -7,7 +7,4 @@
- Die Makefile sollte komplett neu geschrieben werden.
Unix / SDL:
- Den Clipboardcode raus, tut eh nicht
- Input (Mouse und Keyboard) auf dem Renderer-Code rausfrickeln und in
zwei SDL-Backend mouse.c und keyboard.c neuschreiben.
- SDL GL-Backend refresh.c komplett neuschreiben

View file

@ -696,9 +696,6 @@ void CL_Frame (int msec)
return; /* framerate is too high */
}
/* let the mouse activate or deactivate */
IN_Frame ();
/* decide the simulation time */
cls.frametime = extratime/1000.0;

View file

@ -230,32 +230,6 @@ void Key_Console (int key) {
break;
}
if ( ( toupper( key ) == 'V' && keydown[K_CTRL] ) ||
( ( ( key == K_INS ) || ( key == K_KP_INS ) ) && keydown[K_SHIFT] ) ) {
char *cbd;
if ( ( cbd = Sys_GetClipboardData() ) != 0 ) {
int i;
strsep( &cbd, "\n\r\b" );
i = (int)strlen( cbd );
if ( i + key_linepos >= MAXCMDLINE - 1)
i= MAXCMDLINE - key_linepos - 1;
if ( i > 0 ) {
cbd[i]=0;
strcat( key_lines[edit_line], cbd );
key_linepos += i;
}
free( cbd );
}
return;
}
if ( key == 'l' ) {
if ( keydown[K_CTRL] ) {
Cbuf_AddText ("clear\n");

View file

@ -184,27 +184,6 @@ qboolean Field_Key( menufield_s *f, int key ) {
}
}
/* support pasting from the clipboard */
if ( ( toupper( key ) == 'V' && keydown[K_CTRL] ) ||
( ( ( key == K_INS ) || ( key == K_KP_INS ) ) && keydown[K_SHIFT] ) ) {
char *cbd;
if ( ( cbd = Sys_GetClipboardData() ) != 0 ) {
strsep( &cbd, "\n\r\b" );
strncpy( f->buffer, cbd, f->length - 1 );
f->cursor = (int)strlen( f->buffer );
f->visible_offset = f->cursor - f->visible_length;
if ( f->visible_offset < 0 )
f->visible_offset = 0;
free( cbd );
}
return true;
}
switch ( key ) {
case K_KP_LEFTARROW:
case K_LEFTARROW:

View file

@ -70,13 +70,9 @@ void ( *IN_BackendInit_fp )( in_state_t *in_state_p );
void ( *IN_BackendShutdown_fp )( void );
void ( *IN_BackendMouseButtons_fp )( void );
void ( *IN_BackendMove_fp )( usercmd_t *cmd );
void ( *RW_IN_Frame_fp )( void );
void IN_Init ( void );
/* CLIPBOARD */
char *( *RW_Sys_GetClipboardData_fp )(void);
extern void VID_MenuShutdown ( void );
/* DLL GLUE */
@ -204,8 +200,6 @@ VID_FreeReflib ( void )
IN_BackendShutdown_fp = NULL;
IN_BackendMouseButtons_fp = NULL;
IN_BackendMove_fp = NULL;
RW_IN_Frame_fp = NULL;
RW_Sys_GetClipboardData_fp = NULL;
memset( &re, 0, sizeof ( re ) );
reflib_library = NULL;
@ -305,12 +299,9 @@ VID_LoadRefresh ( char *name )
( ( IN_BackendMouseButtons_fp = dlsym( reflib_library, "IN_BackendMouseButtons" ) ) == NULL ) ||
( ( IN_BackendMove_fp = dlsym( reflib_library, "IN_BackendMove" ) ) == NULL ) )
{
Sys_Error( "No RW_IN functions in REF.\n" );
Sys_Error( "No input backend init functions in REF.\n" );
}
/* this one is optional */
RW_Sys_GetClipboardData_fp = dlsym( reflib_library, "RW_Sys_GetClipboardData" );
IN_Init();
if ( re.Init( 0, 0 ) == -1 )
@ -480,31 +471,9 @@ IN_Move ( usercmd_t *cmd )
}
}
void
IN_Frame ( void )
{
if ( RW_IN_Frame_fp )
{
RW_IN_Frame_fp();
}
}
void
Do_Key_Event ( int key, qboolean down )
{
Key_Event( key, down, Sys_Milliseconds() );
}
char *
Sys_GetClipboardData ( void )
{
if ( RW_Sys_GetClipboardData_fp )
{
return ( RW_Sys_GetClipboardData_fp() );
}
else
{
return ( NULL );
}
}