Added mouse=none, fixed serial mice, reverted serial driver (again).
This commit is contained in:
@@ -8,37 +8,39 @@
|
||||
*
|
||||
* Mouse interface to host device.
|
||||
*
|
||||
* Version: @(#)win_mouse.cc 1.0.0 2017/05/30
|
||||
* Version: @(#)win_mouse.cc 1.0.1 2017/06/21
|
||||
*
|
||||
* Author: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Copyright 2008-2017 Sarah Walker.
|
||||
* Copyright 2016-2017 Miran Grca.
|
||||
*/
|
||||
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
#include <dinput.h>
|
||||
#include <stdint.h>
|
||||
#include "plat_mouse.h"
|
||||
#include "win.h"
|
||||
|
||||
|
||||
extern "C" int video_fullscreen;
|
||||
|
||||
extern "C" void fatal(const char *format, ...);
|
||||
extern "C" void pclog(const char *format, ...);
|
||||
|
||||
extern "C" void mouse_init();
|
||||
extern "C" void mouse_close();
|
||||
extern "C" void mouse_poll_host();
|
||||
extern "C" void mouse_init(void);
|
||||
extern "C" void mouse_close(void);
|
||||
extern "C" void mouse_poll_host(void);
|
||||
extern "C" void mouse_get_mickeys(int *x, int *y, int *z);
|
||||
|
||||
|
||||
static LPDIRECTINPUT8 lpdi;
|
||||
static LPDIRECTINPUTDEVICE8 lpdi_mouse = NULL;
|
||||
static DIMOUSESTATE mousestate;
|
||||
static int mouse_x = 0, mouse_y = 0, mouse_z = 0;
|
||||
int mouse_buttons = 0;
|
||||
|
||||
void mouse_init()
|
||||
|
||||
void mouse_init(void)
|
||||
{
|
||||
atexit(mouse_close);
|
||||
|
||||
@@ -52,7 +54,8 @@ void mouse_init()
|
||||
fatal("mouse_init : SetDataFormat failed\n");
|
||||
}
|
||||
|
||||
void mouse_close()
|
||||
|
||||
void mouse_close(void)
|
||||
{
|
||||
if (lpdi_mouse)
|
||||
{
|
||||
@@ -61,7 +64,8 @@ void mouse_close()
|
||||
}
|
||||
}
|
||||
|
||||
void mouse_poll_host()
|
||||
|
||||
void mouse_poll_host(void)
|
||||
{
|
||||
if (FAILED(lpdi_mouse->GetDeviceState(sizeof(DIMOUSESTATE), (LPVOID)&mousestate)))
|
||||
{
|
||||
@@ -82,6 +86,7 @@ void mouse_poll_host()
|
||||
mouse_x = mouse_y = mouse_buttons = 0;
|
||||
}
|
||||
|
||||
|
||||
void mouse_get_mickeys(int *x, int *y, int *z)
|
||||
{
|
||||
*x = mouse_x;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Windows 86Box Settings dialog handler.
|
||||
*
|
||||
* Version: @(#)win_settings.c 1.0.4 2017/06/19
|
||||
* Version: @(#)win_settings.c 1.0.5 2017/06/21
|
||||
*
|
||||
* Author: Miran Grca, <mgrca8@gmail.com>
|
||||
* Copyright 2016-2017 Miran Grca.
|
||||
@@ -902,32 +902,35 @@ static BOOL CALLBACK win_settings_input_proc(HWND hdlg, UINT message, WPARAM wPa
|
||||
{
|
||||
switch(c)
|
||||
{
|
||||
case 0: /* MS Serial */
|
||||
case 0: /* none */
|
||||
str_id = IDS_2151;
|
||||
break;
|
||||
case 1: /* MS Serial */
|
||||
default:
|
||||
str_id = IDS_2139;
|
||||
break;
|
||||
case 1: /* PS2 2b */
|
||||
case 2: /* PS2 2b */
|
||||
str_id = IDS_2141;
|
||||
break;
|
||||
case 2: /* PS2 intelli 3b */
|
||||
case 3: /* PS2 intelli 3b */
|
||||
str_id = IDS_2142;
|
||||
break;
|
||||
case 3: /* MS/logi bus 2b */
|
||||
case 4: /* MS/logi bus 2b */
|
||||
str_id = IDS_2143;
|
||||
break;
|
||||
case 4: /* Amstrad */
|
||||
case 5: /* Amstrad */
|
||||
str_id = IDS_2162;
|
||||
break;
|
||||
case 5: /* Olivetti M24 */
|
||||
case 6: /* Olivetti M24 */
|
||||
str_id = IDS_2177;
|
||||
break;
|
||||
case 6: /* MouseSystems */
|
||||
case 7: /* MouseSystems */
|
||||
str_id = IDS_2140;
|
||||
break;
|
||||
case 7: /* Logitech Serial */
|
||||
case 8: /* Logitech Serial */
|
||||
str_id = IDS_2224;
|
||||
break;
|
||||
case 8: /* Genius Bus */
|
||||
case 9: /* Genius Bus */
|
||||
str_id = IDS_2161;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user