Xemu [doxygen]  hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
Data Structures | Macros | Functions | Variables
input.c File Reference
#include "xep128.h"
#include "input.h"
#include "dave.h"
#include "keyboard_mapping.h"
#include "screen.h"
#include "joystick.h"
#include <SDL.h>
Include dependency graph for input.c:

Go to the source code of this file.

Data Structures

struct  mouse_modes_st
 

Macros

#define WATCHDOG_USEC(n)   (n / 64)
 
#define BUTTON_MAIN   1
 
#define BUTTON_OTHER   2
 
#define BUTTON_EX3   3
 
#define BUTTON_EX4   4
 
#define BUTTON_EX5   5
 
#define J_COLUMN   1
 
#define K_COLUMN   2
 
#define LAST_MOUSE_MODE   ((sizeof(mouse_modes) / sizeof(const struct mouse_modes_st)) - 1)
 
#define JOYSTICK_SCAN(num, dir)   joystick_scan(num, dir)
 

Functions

int mouse_mode_description (int cfg, char *buffer)
 
void mouse_reset_button (void)
 
void emu_mouse_button (Uint8 sdl_button, int press)
 
void emu_mouse_motion (int dx, int dy)
 
void emu_mouse_wheel (int x, int y, int flipped)
 
void mouse_reset (void)
 
Uint8 read_control_port_bits (void)
 
void mouse_check_data_shift (Uint8 val)
 
int mouse_setup (int cfg)
 
int emu_kbd (SDL_Keysym sym, int press)
 

Variables

int mouse_grab = 0
 
Uint32 raster_time
 
int show_keys = 0
 
int mouse_mode
 

Macro Definition Documentation

◆ BUTTON_EX3

#define BUTTON_EX3   3

Definition at line 65 of file input.c.

◆ BUTTON_EX4

#define BUTTON_EX4   4

Definition at line 66 of file input.c.

◆ BUTTON_EX5

#define BUTTON_EX5   5

Definition at line 67 of file input.c.

◆ BUTTON_MAIN

#define BUTTON_MAIN   1

Definition at line 63 of file input.c.

◆ BUTTON_OTHER

#define BUTTON_OTHER   2

Definition at line 64 of file input.c.

◆ J_COLUMN

#define J_COLUMN   1

Definition at line 70 of file input.c.

◆ JOYSTICK_SCAN

#define JOYSTICK_SCAN (   num,
  dir 
)    joystick_scan(num, dir)

Definition at line 135 of file input.c.

◆ K_COLUMN

#define K_COLUMN   2

Definition at line 71 of file input.c.

◆ LAST_MOUSE_MODE

#define LAST_MOUSE_MODE   ((sizeof(mouse_modes) / sizeof(const struct mouse_modes_st)) - 1)

Definition at line 130 of file input.c.

◆ WATCHDOG_USEC

#define WATCHDOG_USEC (   n)    (n / 64)

Definition at line 57 of file input.c.

Function Documentation

◆ emu_kbd()

int emu_kbd ( SDL_Keysym  sym,
int  press 
)

Definition at line 420 of file input.c.

Here is the call graph for this function:

◆ emu_mouse_button()

void emu_mouse_button ( Uint8  sdl_button,
int  press 
)

Definition at line 182 of file input.c.

Here is the call graph for this function:

◆ emu_mouse_motion()

void emu_mouse_motion ( int  dx,
int  dy 
)

Definition at line 251 of file input.c.

◆ emu_mouse_wheel()

void emu_mouse_wheel ( int  x,
int  y,
int  flipped 
)

Definition at line 268 of file input.c.

◆ mouse_check_data_shift()

void mouse_check_data_shift ( Uint8  val)

Definition at line 364 of file input.c.

◆ mouse_mode_description()

int mouse_mode_description ( int  cfg,
char *  buffer 
)

Definition at line 139 of file input.c.

◆ mouse_reset()

void mouse_reset ( void  )

Definition at line 286 of file input.c.

◆ mouse_reset_button()

void mouse_reset_button ( void  )

Definition at line 163 of file input.c.

Here is the caller graph for this function:

◆ mouse_setup()

int mouse_setup ( int  cfg)

Definition at line 401 of file input.c.

◆ read_control_port_bits()

Uint8 read_control_port_bits ( void  )

Definition at line 317 of file input.c.

Variable Documentation

◆ mouse_grab

int mouse_grab = 0

Definition at line 30 of file input.c.

◆ mouse_mode

int mouse_mode

Definition at line 133 of file input.c.

◆ raster_time

Uint32 raster_time

Definition at line 56 of file nick.c.

◆ show_keys

int show_keys = 0

Definition at line 41 of file input.c.