DOS: Fix cursor position

This commit is contained in:
UnknownShadow200 2025-05-29 22:45:13 +10:00
parent d75c537d81
commit 56f79192e7
2 changed files with 7 additions and 7 deletions

View File

@ -549,9 +549,6 @@ static void InitSockets(void) {
char localip[16] = {0};
char netmask[16] = {0};
char gateway[16] = {0};
u32 addr = inet_addr(localip);
Platform_Log1("ADDR: %h", &addr);
int ret = if_config(localip, netmask, gateway, TRUE, 20);
if (ret >= 0) {

View File

@ -22,6 +22,9 @@
#define MOUSE_CMD_HIDE 0x0002
#define MOUSE_CMD_POLL 0x0003
#define MOUSE_X(x) ((x) / 2)
#define MOUSE_Y(y) (y)
/*########################################################################################################################*
*------------------------------------------------------Mouse support------------------------------------------------------*
@ -45,8 +48,8 @@ static void Mouse_Poll(void) {
__dpmi_int(INT_MOUSE, &regs);
int b = regs.x.bx;
int x = regs.x.cx;
int y = regs.x.dx;
int x = MOUSE_X(regs.x.cx);
int y = MOUSE_Y(regs.x.dx);
Input_SetNonRepeatable(CCMOUSE_L, b & 0x01);
Input_SetNonRepeatable(CCMOUSE_R, b & 0x02);
@ -64,8 +67,8 @@ static void Cursor_GetRawPos(int* x, int* y) {
regs.x.ax = MOUSE_CMD_POLL;
__dpmi_int(INT_MOUSE, &regs);
*x = regs.x.cx;
*y = regs.x.dx;
*x = MOUSE_X(regs.x.cx);
*y = MOUSE_Y(regs.x.dx);
}
void Cursor_SetPosition(int x, int y) {