Merge branch '86Box:master' into nec-v20
This commit is contained in:
@@ -16,3 +16,4 @@ IndentPPDirectives: AfterHash
|
|||||||
IndentExternBlock: NoIndent
|
IndentExternBlock: NoIndent
|
||||||
PointerAlignment: Right
|
PointerAlignment: Right
|
||||||
SpaceAfterCStyleCast: true
|
SpaceAfterCStyleCast: true
|
||||||
|
SortIncludes: false
|
||||||
|
@@ -180,8 +180,8 @@ load_general(void)
|
|||||||
lang_id = plat_language_code(p);
|
lang_id = plat_language_code(p);
|
||||||
|
|
||||||
mouse_sensitivity = ini_section_get_double(cat, "mouse_sensitivity", 1.0);
|
mouse_sensitivity = ini_section_get_double(cat, "mouse_sensitivity", 1.0);
|
||||||
if (mouse_sensitivity < 0.5)
|
if (mouse_sensitivity < 0.1)
|
||||||
mouse_sensitivity = 0.5;
|
mouse_sensitivity = 0.1;
|
||||||
else if (mouse_sensitivity > 2.0)
|
else if (mouse_sensitivity > 2.0)
|
||||||
mouse_sensitivity = 2.0;
|
mouse_sensitivity = 2.0;
|
||||||
|
|
||||||
|
@@ -1064,11 +1064,15 @@ isapnp_reset_device(void *priv, uint8_t ldn)
|
|||||||
|
|
||||||
|
|
||||||
static const device_t isapnp_device = {
|
static const device_t isapnp_device = {
|
||||||
"ISA Plug and Play",
|
.name = "ISA Plug and Play",
|
||||||
"isapnp",
|
.internal_name = "isapnp",
|
||||||
0,
|
.flags = 0,
|
||||||
0,
|
.local = 0,
|
||||||
isapnp_init, isapnp_close, NULL,
|
.init = isapnp_init,
|
||||||
{ NULL }, NULL, NULL,
|
.close = isapnp_close,
|
||||||
NULL
|
.reset = NULL,
|
||||||
|
{ .available = NULL },
|
||||||
|
.speed_changed = NULL,
|
||||||
|
.force_redraw = NULL,
|
||||||
|
.config = NULL
|
||||||
};
|
};
|
||||||
|
@@ -136,6 +136,7 @@ extern int is_pentium; /* TODO: Move back to cpu/cpu.h when it's figured out,
|
|||||||
how to remove that hack from the ET4000/W32p. */
|
how to remove that hack from the ET4000/W32p. */
|
||||||
extern int fixed_size_x, fixed_size_y;
|
extern int fixed_size_x, fixed_size_y;
|
||||||
extern double mouse_sensitivity; /* (C) Mouse sensitivity scale */
|
extern double mouse_sensitivity; /* (C) Mouse sensitivity scale */
|
||||||
|
extern double mouse_x_error, mouse_y_error; /* Mouse error accumulators */
|
||||||
extern int pit_mode; /* (C) force setting PIT mode */
|
extern int pit_mode; /* (C) force setting PIT mode */
|
||||||
extern int fm_driver; /* (C) select FM sound driver */
|
extern int fm_driver; /* (C) select FM sound driver */
|
||||||
|
|
||||||
|
@@ -88,7 +88,7 @@
|
|||||||
<item row="7" column="0" colspan="2">
|
<item row="7" column="0" colspan="2">
|
||||||
<widget class="QSlider" name="horizontalSlider">
|
<widget class="QSlider" name="horizontalSlider">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>50</number>
|
<number>10</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>200</number>
|
<number>200</number>
|
||||||
|
@@ -54,6 +54,7 @@ extern "C" {
|
|||||||
#include <86box/video.h>
|
#include <86box/video.h>
|
||||||
|
|
||||||
double mouse_sensitivity = 1.0;
|
double mouse_sensitivity = 1.0;
|
||||||
|
double mouse_x_error = 0.0, mouse_y_error = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct mouseinputdata {
|
struct mouseinputdata {
|
||||||
@@ -151,8 +152,14 @@ RendererStack::mousePoll()
|
|||||||
#endif
|
#endif
|
||||||
this->mouse_poll_func();
|
this->mouse_poll_func();
|
||||||
|
|
||||||
mouse_x *= mouse_sensitivity;
|
double scaled_x = mouse_x * mouse_sensitivity + mouse_x_error;
|
||||||
mouse_y *= mouse_sensitivity;
|
double scaled_y = mouse_y * mouse_sensitivity + mouse_y_error;
|
||||||
|
|
||||||
|
mouse_x = static_cast<int>(scaled_x);
|
||||||
|
mouse_y = static_cast<int>(scaled_y);
|
||||||
|
|
||||||
|
mouse_x_error = scaled_x - mouse_x;
|
||||||
|
mouse_y_error = scaled_y - mouse_y;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ignoreNextMouseEvent = 1;
|
int ignoreNextMouseEvent = 1;
|
||||||
|
@@ -44,6 +44,7 @@ int resize_pending = 0;
|
|||||||
int resize_w = 0;
|
int resize_w = 0;
|
||||||
int resize_h = 0;
|
int resize_h = 0;
|
||||||
double mouse_sensitivity = 1.0; /* Unused. */
|
double mouse_sensitivity = 1.0; /* Unused. */
|
||||||
|
double mouse_x_error = 0.0, mouse_y_error = 0.0; /* Unused. */
|
||||||
static uint8_t interpixels[17842176];
|
static uint8_t interpixels[17842176];
|
||||||
|
|
||||||
extern void RenderImGui();
|
extern void RenderImGui();
|
||||||
|
@@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
int mouse_capture;
|
int mouse_capture;
|
||||||
double mouse_sensitivity = 1.0; /* Unused. */
|
double mouse_sensitivity = 1.0; /* Unused. */
|
||||||
|
double mouse_x_error = 0.0, mouse_y_error = 0.0; /* Unused. */
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int buttons;
|
int buttons;
|
||||||
|
Reference in New Issue
Block a user