Skip to content

Commit

Permalink
Some more mouse helper functions and fixed the video warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
OBattler committed Jan 17, 2024
1 parent e140f33 commit 19af46a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
9 changes: 9 additions & 0 deletions src/device/mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,15 @@ mouse_scale(int x, int y)
mouse_scale_y(y);
}

void
mouse_scale_axis(int axis, int val)
{
if (axis == 1)
mouse_scale_y(val);
else if (axis == 0)
mouse_scale_x(val);
}

void
mouse_set_z(int z)
{
Expand Down
1 change: 1 addition & 0 deletions src/include/86box/mouse.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ extern void mouse_scale_x(int x);
extern void mouse_scale_y(int y);
extern void mouse_scalef(double x, double y);
extern void mouse_scale(int x, int y);
extern void mouse_scale_axis(int axis, int val);
extern void mouse_set_z(int z);
extern void mouse_clear_z(void);
extern void mouse_subtract_z(int *delta_z, int min, int max, int invert);
Expand Down
1 change: 0 additions & 1 deletion src/video/vid_8514a.c
Original file line number Diff line number Diff line change
Expand Up @@ -4367,7 +4367,6 @@ ibm8514_init(const device_t *info)

svga_t *svga = svga_get_pri();
ibm8514_t *dev = (ibm8514_t *) calloc(1, sizeof(ibm8514_t));
mach_t *mach = NULL;

svga->dev8514 = dev;
svga->ext8514 = NULL;
Expand Down
11 changes: 1 addition & 10 deletions src/video/vid_ati_mach8.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,7 @@ static uint8_t mach_accel_inb(uint16_t port, void *priv);
static uint16_t mach_accel_inw(uint16_t port, void *priv);
static uint8_t mach_in(uint16_t addr, void *priv);

static void ati8514_accel_outb(uint16_t port, uint8_t val, void *priv);
static void ati8514_accel_outw(uint16_t port, uint16_t val, void *priv);
static void ati8514_accel_outl(uint16_t port, uint32_t val, void *priv);
static uint8_t ati8514_accel_inb(uint16_t port, void *priv);
static uint16_t ati8514_accel_inw(uint16_t port, void *priv);
static uint32_t ati8514_accel_inl(uint16_t port, void *priv);


static void mach32_updatemapping(mach_t *mach, svga_t *svga);
static void mach32_updatemapping(mach_t *mach, svga_t *svga);

#ifdef ENABLE_MACH_LOG
int mach_do_log = ENABLE_MACH_LOG;
Expand Down Expand Up @@ -3990,7 +3982,6 @@ static void
mach_accel_out(uint16_t port, uint8_t val, mach_t *mach)
{
svga_t *svga = &mach->svga;
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;

mach_log("[%04X:%08X]: Port NORMAL OUT=%04x, val=%04x.\n", CS, cpu_state.pc, port, val);

Expand Down
2 changes: 1 addition & 1 deletion src/video/vid_xga.c
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,7 @@ xga_line_draw_write(svga_t *svga)
xga_t *xga = (xga_t *) svga->xga;
uint32_t src_dat;
uint32_t dest_dat;
uint32_t old_dest_dat;
uint32_t old_dest_dat = 0x00000000;
uint32_t color_cmp = xga->accel.color_cmp;
uint32_t plane_mask = xga->accel.plane_mask;
uint32_t dstbase = xga->accel.px_map_base[xga->accel.dst_map];
Expand Down

0 comments on commit 19af46a

Please sign in to comment.