Move input.c and input.h into the client and rename to sdl.c.

The input system backend was once used in the client and the renderers,
but for some years now it has been an integral part of the client only.
Move it there.
This commit is contained in:
Yamagi Burmeister 2018-08-07 09:43:34 +02:00
parent 956902538f
commit 61400d1ae8
11 changed files with 11 additions and 17 deletions

View file

@ -165,15 +165,9 @@ endif()
set(Backends-Generic-Source
${BACKENDS_SRC_DIR}/generic/misc.c
${BACKENDS_SRC_DIR}/generic/vid.c
${BACKENDS_SRC_DIR}/sdl/input.c
${BACKENDS_SRC_DIR}/sdl/refresh.c
)
set(Backends-Generic-Header
${BACKENDS_SRC_DIR}/generic/header/input.h
)
set(Backends-Unix-Source
${BACKENDS_SRC_DIR}/generic/misc.c
${BACKENDS_SRC_DIR}/unix/main.c
@ -315,6 +309,7 @@ set(Client-Source
${CLIENT_SRC_DIR}/cl_screen.c
${CLIENT_SRC_DIR}/cl_tempentities.c
${CLIENT_SRC_DIR}/cl_view.c
${CLIENT_SRC_DIR}/input/sdl.c
${CLIENT_SRC_DIR}/menu/menu.c
${CLIENT_SRC_DIR}/menu/qmenu.c
${CLIENT_SRC_DIR}/menu/videomenu.c
@ -363,6 +358,7 @@ set(Client-Header
${CLIENT_SRC_DIR}/header/ref.h
${CLIENT_SRC_DIR}/header/screen.h
${CLIENT_SRC_DIR}/header/vid.h
${CLIENT_SRC_DIR}/input/header/input.h
${CLIENT_SRC_DIR}/menu/header/qmenu.h
${CLIENT_SRC_DIR}/sound/header/local.h
${CLIENT_SRC_DIR}/sound/header/qal.h
@ -545,7 +541,7 @@ endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
add_executable(yquake2 ${Client-Source} ${Client-Header} ${Platform-Specific-Source}
${Backends-Generic-Source} ${Backends-Generic-Header})
${Backends-Generic-Source})
set_target_properties(yquake2 PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/release
)
@ -559,7 +555,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
)
else()
add_executable(quake2 ${Client-Source} ${Client-Header} ${Platform-Specific-Source}
${Backends-Generic-Source} ${Backends-Generic-Header})
${Backends-Generic-Source})
set_target_properties(quake2 PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/release
)

View file

@ -692,7 +692,6 @@ GAME_OBJS_ = \
CLIENT_OBJS_ := \
src/backends/generic/misc.o \
src/backends/generic/vid.o \
src/backends/sdl/input.o \
src/backends/sdl/refresh.o \
src/client/cl_cin.o \
src/client/cl_console.o \
@ -711,6 +710,7 @@ CLIENT_OBJS_ := \
src/client/cl_screen.o \
src/client/cl_tempentities.o \
src/client/cl_view.o \
src/client/input/sdl.o \
src/client/menu/menu.o \
src/client/menu/qmenu.o \
src/client/menu/videomenu.o \

View file

@ -43,7 +43,6 @@
#include "../../common/header/common.h"
#include "../../common/header/glob.h"
#include "../generic/header/input.h"
// Pointer to game library
static void *game_library;

View file

@ -35,7 +35,6 @@
#include <windows.h>
#include "../../common/header/common.h"
#include "../generic/header/input.h"
#include "header/resource.h"
// stdin and stdout handles

View file

@ -26,7 +26,7 @@
*/
#include "header/client.h"
#include "../backends/generic/header/input.h"
#include "input/header/input.h"
extern cvar_t *vid_renderer;

View file

@ -26,7 +26,7 @@
*/
#include "header/client.h"
#include "../backends/generic/header/input.h"
#include "input/header/input.h"
cvar_t *cl_nodelta;

View file

@ -26,7 +26,7 @@
*/
#include "header/client.h"
#include "../backends/generic/header/input.h"
#include "input/header/input.h"
void CL_ForwardToServer_f(void);
void CL_Changing_f(void);

View file

@ -25,7 +25,7 @@
*/
#include "header/client.h"
#include "../backends/generic/header/input.h"
#include "input/header/input.h"
void CL_DownloadFileName(char *dest, int destlen, char *fn);
void CL_ParseDownload(void);

View file

@ -25,7 +25,7 @@
*/
#include "header/client.h"
#include "../backends/generic/header/input.h"
#include "input/header/input.h"
/* development tools for weapons */
int gun_frame;

View file

@ -29,9 +29,9 @@
#include <SDL2/SDL.h>
#include "header/input.h"
#include "../../client/header/keyboard.h"
#include "../../client/header/client.h"
#include "../generic/header/input.h"
// ----