mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-24 03:02:31 +00:00
[console] Update a little for event handling
Con_CheckResize is no longer necessary thanks to the ie_app_window event, and the client doesn't need C_ProcessInput so that is now optional.
This commit is contained in:
parent
8be5d35b0d
commit
230e23db5d
7 changed files with 3 additions and 41 deletions
|
@ -65,7 +65,6 @@ extern struct console_data_s con_data;
|
|||
//extern qboolean con_initialized;
|
||||
//extern byte *con_chars;
|
||||
|
||||
void Con_CheckResize (void);
|
||||
void Con_DrawConsole (void);
|
||||
|
||||
void Con_Printf (const char *fmt, ...) __attribute__((format(PRINTF, 1, 2)));
|
||||
|
|
|
@ -38,7 +38,6 @@ typedef struct console_funcs_s {
|
|||
void (*print) (const char *fmt, va_list args) __attribute__((format(PRINTF, 1, 0)));
|
||||
void (*process_input) (void);
|
||||
void (*draw_console) (void);
|
||||
void (*check_resize) (void);
|
||||
void (*new_map) (void);
|
||||
void (*set_state) (con_state_t state);
|
||||
} console_funcs_t;
|
||||
|
|
|
@ -288,21 +288,6 @@ Resize (con_buffer_t *con)
|
|||
input_line->width = con_linewidth;
|
||||
}
|
||||
|
||||
/*
|
||||
C_CheckResize
|
||||
|
||||
If the line width has changed, reformat the buffer.
|
||||
*/
|
||||
static void
|
||||
C_CheckResize (void)
|
||||
{
|
||||
Resize (con_main);
|
||||
//Resize (con_chat);
|
||||
|
||||
view_resize (con_data.view, r_data->vid->conview->xlen,
|
||||
r_data->vid->conview->ylen);
|
||||
}
|
||||
|
||||
static void
|
||||
Condump_f (void)
|
||||
{
|
||||
|
@ -735,11 +720,6 @@ C_DrawConsole (void)
|
|||
con_data.view->draw (con_data.view);
|
||||
}
|
||||
|
||||
static void
|
||||
C_ProcessInput (void)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
C_NewMap (void)
|
||||
{
|
||||
|
@ -1007,9 +987,7 @@ static general_funcs_t plugin_info_general_funcs = {
|
|||
|
||||
static console_funcs_t plugin_info_console_funcs = {
|
||||
.print = C_Print,
|
||||
.process_input = C_ProcessInput,
|
||||
.draw_console = C_DrawConsole,
|
||||
.check_resize = C_CheckResize,
|
||||
.new_map = C_NewMap,
|
||||
.set_state = C_SetState,
|
||||
};
|
||||
|
|
|
@ -180,7 +180,9 @@ VISIBLE void
|
|||
Con_ProcessInput (void)
|
||||
{
|
||||
if (con_module) {
|
||||
con_module->functions->console->process_input ();
|
||||
if (con_module->functions->console->process_input) {
|
||||
con_module->functions->console->process_input ();
|
||||
}
|
||||
} else {
|
||||
static int been_there_done_that = 0;
|
||||
|
||||
|
@ -205,13 +207,6 @@ Con_DrawConsole (void)
|
|||
con_module->functions->console->draw_console ();
|
||||
}
|
||||
|
||||
VISIBLE void
|
||||
Con_CheckResize (void)
|
||||
{
|
||||
if (con_module)
|
||||
con_module->functions->console->check_resize ();
|
||||
}
|
||||
|
||||
VISIBLE void
|
||||
Con_NewMap (void)
|
||||
{
|
||||
|
|
|
@ -803,11 +803,6 @@ C_DrawConsole (void)
|
|||
sv_con_data.status_view->draw (sv_con_data.status_view);
|
||||
}
|
||||
|
||||
static void
|
||||
C_CheckResize (void)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
C_NewMap (void)
|
||||
{
|
||||
|
@ -823,7 +818,6 @@ static console_funcs_t plugin_info_console_funcs = {
|
|||
.print = C_Print,
|
||||
.process_input = C_ProcessInput,
|
||||
.draw_console = C_DrawConsole,
|
||||
.check_resize = C_CheckResize,
|
||||
.new_map = C_NewMap,
|
||||
};
|
||||
|
||||
|
|
|
@ -192,8 +192,6 @@ VID_GetWindowSize (int def_w, int def_h)
|
|||
// make con_height >= 200
|
||||
con_height = max (con_height & ~7, 200);
|
||||
viddef.conview->ylen = con_height;
|
||||
|
||||
Con_CheckResize (); // Now that we have a window size, fix console
|
||||
}
|
||||
|
||||
/* GAMMA FUNCTIONS */
|
||||
|
|
|
@ -686,7 +686,6 @@ x11_create_context (sw_ctx_t *ctx)
|
|||
// No console scaling in the sw renderer
|
||||
viddef.conview->xlen = viddef.width;
|
||||
viddef.conview->ylen = viddef.height;
|
||||
Con_CheckResize ();
|
||||
|
||||
viddef.vid_internal->init_buffers = x11_init_buffers;
|
||||
// XSynchronize (x_disp, False);
|
||||
|
|
Loading…
Reference in a new issue