mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-23 13:02:07 +00:00
Remove Sys_SendKeyEvents().
That function did nothing, we can just call IN_Update() directly...
This commit is contained in:
parent
54ab3f75db
commit
b3562015b0
9 changed files with 19 additions and 46 deletions
|
@ -29,6 +29,11 @@
|
||||||
|
|
||||||
#include "../../../common/header/shared.h"
|
#include "../../../common/header/shared.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Saves the time of the last input event.
|
||||||
|
*/
|
||||||
|
extern int sys_frame_time;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initializes the input backend
|
* Initializes the input backend
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -68,6 +68,7 @@
|
||||||
static int mouse_x, mouse_y;
|
static int mouse_x, mouse_y;
|
||||||
static int old_mouse_x, old_mouse_y;
|
static int old_mouse_x, old_mouse_y;
|
||||||
static qboolean mlooking;
|
static qboolean mlooking;
|
||||||
|
int sys_frame_time;
|
||||||
|
|
||||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||||
static float joystick_yaw, joystick_pitch;
|
static float joystick_yaw, joystick_pitch;
|
||||||
|
@ -701,9 +702,12 @@ IN_Update(void)
|
||||||
|
|
||||||
/* calling GLimp_GrabInput() each is a bit ugly but simple and should work.
|
/* calling GLimp_GrabInput() each is a bit ugly but simple and should work.
|
||||||
* + the called SDL functions return after a cheap check, if there's
|
* + the called SDL functions return after a cheap check, if there's
|
||||||
* nothing to do, anyway
|
* nothing to do, anyway. */
|
||||||
*/
|
|
||||||
GLimp_GrabInput(want_grab);
|
GLimp_GrabInput(want_grab);
|
||||||
|
|
||||||
|
/* We need to save the frame time so other subsystems know the
|
||||||
|
* exact time of the last input events. */
|
||||||
|
sys_frame_time = Sys_Milliseconds();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -53,9 +53,6 @@ qboolean stdin_active = true;
|
||||||
// Console logfile
|
// Console logfile
|
||||||
extern FILE *logfile;
|
extern FILE *logfile;
|
||||||
|
|
||||||
// TODO
|
|
||||||
unsigned sys_frame_time;
|
|
||||||
|
|
||||||
/* ================================================================ */
|
/* ================================================================ */
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -526,18 +523,3 @@ Sys_LoadLibrary(const char *path, const char *sym, void **handle)
|
||||||
|
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ================================================================ */
|
|
||||||
|
|
||||||
// TODO: Remove.
|
|
||||||
|
|
||||||
void
|
|
||||||
Sys_SendKeyEvents(void)
|
|
||||||
{
|
|
||||||
#ifndef DEDICATED_ONLY
|
|
||||||
IN_Update();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* grab frame time */
|
|
||||||
sys_frame_time = Sys_Milliseconds();
|
|
||||||
}
|
|
||||||
|
|
|
@ -50,7 +50,6 @@ static size_t console_textlen;
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
qboolean is_portable;
|
qboolean is_portable;
|
||||||
unsigned int sys_frame_time;
|
|
||||||
|
|
||||||
/* ================================================================ */
|
/* ================================================================ */
|
||||||
|
|
||||||
|
@ -672,18 +671,3 @@ Sys_SetHighDPIMode(void)
|
||||||
SetProcessDPIAware();
|
SetProcessDPIAware();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ======================================================================= */
|
|
||||||
|
|
||||||
// TODO: Remove.
|
|
||||||
|
|
||||||
void
|
|
||||||
Sys_SendKeyEvents(void)
|
|
||||||
{
|
|
||||||
#ifndef DEDICATED_ONLY
|
|
||||||
IN_Update();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* grab frame time */
|
|
||||||
sys_frame_time = timeGetTime();
|
|
||||||
}
|
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
|
|
||||||
cvar_t *cl_nodelta;
|
cvar_t *cl_nodelta;
|
||||||
|
|
||||||
extern unsigned sys_frame_time;
|
|
||||||
unsigned frame_msec;
|
unsigned frame_msec;
|
||||||
unsigned old_sys_frame_time;
|
unsigned old_sys_frame_time;
|
||||||
|
|
||||||
|
|
|
@ -365,7 +365,7 @@ CL_Skins_f(void)
|
||||||
|
|
||||||
SCR_UpdateScreen();
|
SCR_UpdateScreen();
|
||||||
|
|
||||||
Sys_SendKeyEvents(); /* pump message loop */
|
IN_Update(); /* pump message loop */
|
||||||
|
|
||||||
CL_ParseClientinfo(i);
|
CL_ParseClientinfo(i);
|
||||||
}
|
}
|
||||||
|
@ -755,7 +755,7 @@ CL_Frame(int packetdelta, int renderdelta, int timedelta, qboolean packetframe,
|
||||||
{
|
{
|
||||||
CL_ReadPackets();
|
CL_ReadPackets();
|
||||||
CL_UpdateWindowedMouse();
|
CL_UpdateWindowedMouse();
|
||||||
Sys_SendKeyEvents();
|
IN_Update();
|
||||||
Cbuf_Execute();
|
Cbuf_Execute();
|
||||||
CL_FixCvarCheats();
|
CL_FixCvarCheats();
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "header/client.h"
|
#include "header/client.h"
|
||||||
|
#include "../backends/generic/header/input.h"
|
||||||
|
|
||||||
void CL_DownloadFileName(char *dest, int destlen, char *fn);
|
void CL_DownloadFileName(char *dest, int destlen, char *fn);
|
||||||
void CL_ParseDownload(void);
|
void CL_ParseDownload(void);
|
||||||
|
@ -73,7 +74,7 @@ CL_RegisterSounds(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
cl.sound_precache[i] = S_RegisterSound(cl.configstrings[CS_SOUNDS + i]);
|
cl.sound_precache[i] = S_RegisterSound(cl.configstrings[CS_SOUNDS + i]);
|
||||||
Sys_SendKeyEvents();
|
IN_Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
S_EndRegistration();
|
S_EndRegistration();
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "header/client.h"
|
#include "header/client.h"
|
||||||
|
#include "../backends/generic/header/input.h"
|
||||||
|
|
||||||
/* development tools for weapons */
|
/* development tools for weapons */
|
||||||
int gun_frame;
|
int gun_frame;
|
||||||
|
@ -281,7 +282,7 @@ CL_PrepRefresh(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
SCR_UpdateScreen();
|
SCR_UpdateScreen();
|
||||||
Sys_SendKeyEvents();
|
IN_Update();
|
||||||
|
|
||||||
if (name[0] == '#')
|
if (name[0] == '#')
|
||||||
{
|
{
|
||||||
|
@ -321,7 +322,7 @@ CL_PrepRefresh(void)
|
||||||
for (i = 1; i < MAX_IMAGES && cl.configstrings[CS_IMAGES + i][0]; i++)
|
for (i = 1; i < MAX_IMAGES && cl.configstrings[CS_IMAGES + i][0]; i++)
|
||||||
{
|
{
|
||||||
cl.image_precache[i] = Draw_FindPic(cl.configstrings[CS_IMAGES + i]);
|
cl.image_precache[i] = Draw_FindPic(cl.configstrings[CS_IMAGES + i]);
|
||||||
Sys_SendKeyEvents();
|
IN_Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
Com_Printf(" \r");
|
Com_Printf(" \r");
|
||||||
|
@ -335,7 +336,7 @@ CL_PrepRefresh(void)
|
||||||
|
|
||||||
Com_Printf("client %i\r", i);
|
Com_Printf("client %i\r", i);
|
||||||
SCR_UpdateScreen();
|
SCR_UpdateScreen();
|
||||||
Sys_SendKeyEvents();
|
IN_Update();
|
||||||
CL_ParseClientinfo(i);
|
CL_ParseClientinfo(i);
|
||||||
Com_Printf(" \r");
|
Com_Printf(" \r");
|
||||||
}
|
}
|
||||||
|
|
|
@ -789,9 +789,6 @@ void *Sys_LoadLibrary(const char *path, const char *sym, void **handle);
|
||||||
void *Sys_GetGameAPI(void *parms);
|
void *Sys_GetGameAPI(void *parms);
|
||||||
void Sys_UnloadGame(void);
|
void Sys_UnloadGame(void);
|
||||||
|
|
||||||
// TODO: Remove
|
|
||||||
void Sys_SendKeyEvents(void);
|
|
||||||
|
|
||||||
// Windows only (system.c)
|
// Windows only (system.c)
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
void Sys_RedirectStdout(void);
|
void Sys_RedirectStdout(void);
|
||||||
|
|
Loading…
Reference in a new issue