Merge remote-tracking branch 'origin/master' into optiplex_gnplus
This commit is contained in:
@@ -1125,6 +1125,14 @@ write_cmd_generic(void *priv, uint8_t val)
|
||||
*/
|
||||
uint8_t p1 = 0x30;
|
||||
kbc_delay_to_ob(dev, p1, 0, 0x00);
|
||||
} else if (!strcmp(machine_get_internal_name(), "dellplato") || !strcmp(machine_get_internal_name(), "dellhannibalp")) {
|
||||
/*
|
||||
Dell Dimension XPS Pxxx & Pxxxa/Mxxxa:
|
||||
- Bit 3: Password disable jumper (must be clear);
|
||||
- Bit 4: Clear CMOS jumper (must be set);
|
||||
*/
|
||||
uint8_t p1 = 0x10;
|
||||
kbc_delay_to_ob(dev, p1, 0, 0x00);
|
||||
} else {
|
||||
/* (B0 or F0) | (0x08 or 0x0c) */
|
||||
uint8_t p1_out = ((dev->p1 | fixed_bits) & 0xf0) |
|
||||
|
||||
@@ -61,6 +61,11 @@ struct mouseinputdata {
|
||||
static mouseinputdata mousedata;
|
||||
|
||||
extern MainWindow *main_window;
|
||||
|
||||
#ifdef Q_OS_WINDOWS
|
||||
HWND rw_hwnd;
|
||||
#endif
|
||||
|
||||
RendererStack::RendererStack(QWidget *parent, int monitor_index)
|
||||
: QStackedWidget(parent)
|
||||
, ui(new Ui::RendererStack)
|
||||
@@ -251,7 +256,9 @@ RendererStack::mouseMoveEvent(QMouseEvent *event)
|
||||
leaveEvent((QEvent *) event);
|
||||
ignoreNextMouseEvent--;
|
||||
}
|
||||
#if !defined _WIN32
|
||||
QCursor::setPos(mapToGlobal(QPoint(width() / 2, height() / 2)));
|
||||
#endif
|
||||
ignoreNextMouseEvent = 2;
|
||||
oldPos = event->pos();
|
||||
#endif
|
||||
@@ -405,8 +412,15 @@ RendererStack::createRenderer(Renderer renderer)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (current.get() == nullptr)
|
||||
if (current.get() == nullptr) {
|
||||
#ifdef Q_OS_WINDOWS
|
||||
rw_hwnd = NULL;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
#ifdef Q_OS_WINDOWS
|
||||
rw_hwnd = (HWND) this->winId();
|
||||
#endif
|
||||
current->setFocusPolicy(Qt::NoFocus);
|
||||
current->setFocusProxy(this);
|
||||
current->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
@@ -649,6 +663,14 @@ RendererStack::setFocusRenderer()
|
||||
void
|
||||
RendererStack::onResize(int width, int height)
|
||||
{
|
||||
#ifdef Q_OS_WINDOWS
|
||||
if (mouse_capture) {
|
||||
RECT rect;
|
||||
if (GetWindowRect((HWND)this->winId(), &rect)) {
|
||||
ClipCursor(&rect);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (rendererWindow) {
|
||||
rendererWindow->r_monitor_index = m_monitor_index;
|
||||
rendererWindow->onResize(width, height);
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <QStatusBar>
|
||||
#include <QApplication>
|
||||
|
||||
#include "qt_mainwindow.hpp"
|
||||
#include "qt_machinestatus.hpp"
|
||||
@@ -122,6 +123,10 @@ plat_resize(int w, int h, int monitor_index)
|
||||
main_window->resizeContents(w, h);
|
||||
}
|
||||
|
||||
#if defined _WIN32
|
||||
extern HWND rw_hwnd;
|
||||
#endif
|
||||
|
||||
void
|
||||
plat_mouse_capture(int on)
|
||||
{
|
||||
@@ -129,6 +134,26 @@ plat_mouse_capture(int on)
|
||||
return;
|
||||
|
||||
main_window->setMouseCapture(on > 0 ? true : false);
|
||||
|
||||
#if defined _WIN32
|
||||
if (on) {
|
||||
QCursor cursor(Qt::BlankCursor);
|
||||
|
||||
QApplication::setOverrideCursor(cursor);
|
||||
QApplication::changeOverrideCursor(cursor);
|
||||
|
||||
RECT rect;
|
||||
|
||||
GetWindowRect(rw_hwnd, &rect);
|
||||
|
||||
ClipCursor(&rect);
|
||||
|
||||
} else {
|
||||
ClipCursor(NULL);
|
||||
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
@@ -395,7 +395,7 @@ WindowsRawInputFilter::mouse_handle(PRAWINPUT raw)
|
||||
|
||||
mouse_scale(delta_x, delta_y);
|
||||
|
||||
HWND wnd = (HWND)window->winId();
|
||||
/* HWND wnd = (HWND)window->winId();
|
||||
|
||||
RECT rect;
|
||||
|
||||
@@ -404,5 +404,5 @@ WindowsRawInputFilter::mouse_handle(PRAWINPUT raw)
|
||||
int left = rect.left + (rect.right - rect.left) / 2;
|
||||
int top = rect.top + (rect.bottom - rect.top) / 2;
|
||||
|
||||
SetCursorPos(left, top);
|
||||
SetCursorPos(left, top); */
|
||||
}
|
||||
|
||||
@@ -8042,7 +8042,7 @@ s3_accel_start(int count, int cpu_input, uint32_t mix_dat, uint32_t cpu_dat, voi
|
||||
|
||||
s3->accel.sy = s3->accel.maj_axis_pcnt;
|
||||
if ((s3->bpp == 0) && s3->color_16bit) {
|
||||
s3->accel.rd_mask_16bit_check = ((rd_mask & 0xff00) != 0xff00);
|
||||
s3->accel.rd_mask_16bit_check = ((rd_mask & 0xff00) != 0xff00) && rd_mask;
|
||||
if (s3->accel.rd_mask_16bit_check) {
|
||||
if ((s3->accel.cur_x_overflow & 0xc00) == 0xc00)
|
||||
s3->accel.start = 1;
|
||||
@@ -8353,7 +8353,7 @@ s3_accel_start(int count, int cpu_input, uint32_t mix_dat, uint32_t cpu_dat, voi
|
||||
s3->accel.dest = dstbase + s3->accel.cy * s3->width;
|
||||
|
||||
if ((s3->bpp == 0) && s3->color_16bit) {
|
||||
s3->accel.rd_mask_16bit_check = ((rd_mask & 0xff00) != 0xff00);
|
||||
s3->accel.rd_mask_16bit_check = ((rd_mask & 0xff00) != 0xff00) && rd_mask;
|
||||
if (s3->accel.rd_mask_16bit_check) {
|
||||
if (s3->accel.cmd == 0x41b3) {
|
||||
if (frgd_mix == 0) {
|
||||
@@ -8478,9 +8478,10 @@ s3_accel_start(int count, int cpu_input, uint32_t mix_dat, uint32_t cpu_dat, voi
|
||||
if ((s3_cpu_src(s3)) && !(s3->accel.cmd & 0x200)) {
|
||||
s3_log("FIXME: S3 911/924 15/16bpp documentation needed.\n");
|
||||
} else {
|
||||
if (!cpu_input && (s3->accel.cur_x & 0x400))
|
||||
if (!cpu_input && (s3->accel.cur_x & 0x400)) {
|
||||
s3_log("No Input.\n");
|
||||
break;
|
||||
else if (cpu_input && (s3->accel.cmd == 0x53b3) && (s3->accel.cur_x & 0x400))
|
||||
} else if (cpu_input && (s3->accel.cmd == 0x53b3) && (s3->accel.cur_x & 0x400))
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -8756,7 +8757,7 @@ s3_accel_start(int count, int cpu_input, uint32_t mix_dat, uint32_t cpu_dat, voi
|
||||
s3->accel.cy = s3->accel.cur_y & 0xfff;
|
||||
|
||||
if ((s3->bpp == 0) && s3->color_16bit) {
|
||||
s3->accel.rd_mask_16bit_check = ((rd_mask & 0xff00) != 0xff00);
|
||||
s3->accel.rd_mask_16bit_check = ((rd_mask & 0xff00) != 0xff00) && rd_mask;
|
||||
if (s3->accel.rd_mask_16bit_check) {
|
||||
if (!(clip_r & 0x400))
|
||||
s3->accel.start = 1;
|
||||
@@ -8805,7 +8806,7 @@ s3_accel_start(int count, int cpu_input, uint32_t mix_dat, uint32_t cpu_dat, voi
|
||||
s3_log("CMDFULL=%04x, FRGDSEL=%x, BKGDSEL=%x, FRGDMIX=%02x, BKGDMIX=%02x, MASKCHECK=%x, RDMASK=%04x, MINUS=%d, WRTMASK=%04X, MIX=%04x, CX=%d, CY=%d, DX=%d, DY=%d, SX=%d, SY=%d, PIXCNTL=%02x, 16BITCOLOR=%x, RDCHECK=%x, CLIPL=%d, CLIPR=%d, OVERFLOW=%d, pitch=%d.\n", s3->accel.cmd, frgd_mix, bkgd_mix, s3->accel.frgd_mix & 0x0f, s3->accel.bkgd_mix & 0x0f, s3->accel.rd_mask_16bit_check, rd_mask, s3->accel.minus, wrt_mask, mix_dat & 0xffff, s3->accel.cx, s3->accel.cy, s3->accel.dx, s3->accel.dy, s3->accel.sx, s3->accel.sy, s3->accel.multifunc[0x0a] & 0xc4, s3->accel.color_16bit_check, s3->accel.rd_mask_16bit_check, clip_l, clip_r, (s3->accel.destx_overflow & 0xc00) == 0xc00, s3->width);
|
||||
|
||||
if (!cpu_input && (frgd_mix == 3) && !vram_mask && !(s3->accel.multifunc[0xe] & 0x100) && ((s3->accel.cmd & 0xa0) == 0xa0) && ((s3->accel.frgd_mix & 0xf) == 7) && ((s3->accel.bkgd_mix & 0xf) == 7)) {
|
||||
pclog("Special BitBLT.\n");
|
||||
s3_log("Special BitBLT.\n");
|
||||
while (1) {
|
||||
if ((s3->accel.dx >= clip_l) && (s3->accel.dx <= clip_r) && (s3->accel.dy >= clip_t) && (s3->accel.dy <= clip_b)) {
|
||||
READ(s3->accel.src + s3->accel.cx - s3->accel.minus, src_dat);
|
||||
|
||||
Reference in New Issue
Block a user