mirror of
https://github.com/86Box/86Box.git
synced 2026-02-21 17:15:32 -07:00
Merge branch 'master' of ssh://github.com/86Box/86Box
This commit is contained in:
@@ -171,6 +171,7 @@ int vid_api = 0; /* (C) video r
|
||||
int vid_cga_contrast = 0; /* (C) video */
|
||||
int video_fullscreen = 0; /* (C) video */
|
||||
int video_fullscreen_scale = 0; /* (C) video */
|
||||
int fullscreen_ui_visible = 0; /* (C) video */
|
||||
int enable_overscan = 0; /* (C) video */
|
||||
int force_43 = 0; /* (C) video */
|
||||
int video_filter_method = 1; /* (C) video */
|
||||
@@ -286,6 +287,11 @@ struct accelKey def_acc_keys[NUM_ACCELS] = {
|
||||
.name="mute",
|
||||
.desc="Toggle mute",
|
||||
.seq="Ctrl+Alt+M"
|
||||
},
|
||||
{
|
||||
.name="toggle_ui_fullscreen",
|
||||
.desc="Toggle UI in fullscreen",
|
||||
.seq="Ctrl+Alt+PgDown"
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -372,7 +372,7 @@ keyboard_input(int down, uint16_t scan)
|
||||
/* kbc_at_log("Received scan code: %03X (%s)\n", scan & 0x1ff, down ? "down" : "up"); */
|
||||
recv_key_ui[scan & 0x1ff] = down;
|
||||
|
||||
if (mouse_capture || !kbd_req_capture || video_fullscreen) {
|
||||
if (mouse_capture || !kbd_req_capture || (video_fullscreen && !fullscreen_ui_visible)) {
|
||||
recv_key[scan & 0x1ff] = down;
|
||||
key_process(scan & 0x1ff, down);
|
||||
}
|
||||
|
||||
@@ -481,7 +481,7 @@ bm_poll(void *priv)
|
||||
int xor;
|
||||
int b = mouse_get_buttons_ex();
|
||||
|
||||
if (!mouse_capture && !video_fullscreen)
|
||||
if (!mouse_capture && !(video_fullscreen && !fullscreen_ui_visible))
|
||||
return 1;
|
||||
|
||||
if (!(dev->flags & FLAG_ENABLED))
|
||||
@@ -543,7 +543,7 @@ bm_update_data(mouse_t *dev)
|
||||
int xor;
|
||||
|
||||
/* If the counters are not frozen, update them. */
|
||||
if ((mouse_capture || video_fullscreen) && !(dev->flags & FLAG_HOLD)) {
|
||||
if ((mouse_capture || (video_fullscreen && !fullscreen_ui_visible)) && !(dev->flags & FLAG_HOLD)) {
|
||||
/* Update the deltas and the delays. */
|
||||
mouse_subtract_coords(&delta_x, &delta_y, NULL, NULL, -128, 127, 0, 0);
|
||||
|
||||
|
||||
@@ -332,7 +332,7 @@ ps2_poll(void *priv)
|
||||
atkbc_dev_t *dev = (atkbc_dev_t *) priv;
|
||||
int packet_size = (dev->flags & FLAG_INTMODE) ? 4 : 3;
|
||||
|
||||
int cond = (mouse_capture || video_fullscreen) && mouse_scan && (dev->mode == MODE_STREAM) &&
|
||||
int cond = (mouse_capture || (video_fullscreen && !fullscreen_ui_visible)) && mouse_scan && (dev->mode == MODE_STREAM) &&
|
||||
mouse_state_changed() && (kbc_at_dev_queue_pos(dev, 1) < (FIFO_SIZE - packet_size));
|
||||
|
||||
if (cond)
|
||||
|
||||
@@ -288,7 +288,7 @@ struct accelKey {
|
||||
char desc[64];
|
||||
char seq[64];
|
||||
};
|
||||
#define NUM_ACCELS 8
|
||||
#define NUM_ACCELS 9
|
||||
extern struct accelKey acc_keys[NUM_ACCELS];
|
||||
extern struct accelKey def_acc_keys[NUM_ACCELS];
|
||||
extern int FindAccelerator(const char *name);
|
||||
|
||||
@@ -143,9 +143,9 @@ static const struct cdrom_drive_types_s {
|
||||
{ "GOLDSTAR", "GCD-R560B", "1.00", "goldstar_r560b", BUS_TYPE_IDE, 0, 6, 36, 0, 0, { 4, 2, 2, -1 } },
|
||||
{ "HITACHI", "CDR-8130", "0020", "hitachi_r8130", BUS_TYPE_IDE, 0, 16, 36, 0, 0, { 4, 2, 2, -1 } },
|
||||
{ "HITACHI", "CDR-8435", "0010", "hitachi_r8435", BUS_TYPE_IDE, 0, 32, 36, 0, 0, { 4, 2, 2, -1 } },
|
||||
{ "HITACHI", "GD-7500", "A1 ", "hitachi_7500", BUS_TYPE_IDE, 0, 40, 36, 0, 0, { 4, 2, 2, 2 } }, /* DVD. */
|
||||
{ "HITACHI", "GD-7500", "A1 ", "hitachi_7500", BUS_TYPE_IDE, 0, 40, 36, 0, 1, { 4, 2, 2, 2 } }, /* DVD. */
|
||||
{ "HL-DT-ST", "CD-ROM GCR-8526B", "1.01", "hldtst_8526b", BUS_TYPE_IDE, 0, 52, 36, 0, 0, { 4, 2, 2, 2 } },
|
||||
{ "HL-DT-ST", "DVDRAM GSA-4160", "A302", "hldtst_4160", BUS_TYPE_IDE, 0, 40, 36, 0, 0, { 4, 2, 2, 2 } },
|
||||
{ "HL-DT-ST", "DVDRAM GSA-4160", "A302", "hldtst_4160", BUS_TYPE_IDE, 0, 40, 36, 0, 1, { 4, 2, 2, 2 } },
|
||||
{ "KENWOOD", "CD-ROM UCR-421", "208E", "kenwood_421", BUS_TYPE_IDE, 0, 72, 36, 0, 0, { 4, 2, 2, 4 } },
|
||||
/*
|
||||
This is a laptop/notebook drive, as is also evident from the name:
|
||||
@@ -183,6 +183,7 @@ static const struct cdrom_drive_types_s {
|
||||
{ "TEAC", "CD-532E", "2.0A", "teac_532e", BUS_TYPE_IDE, 0, 32, 36, 0, 0, { 3, 2, 2, -1 } },
|
||||
{ "TOSHIBA", "CD-ROM XM-5302TA", "0305", "toshiba_5302ta", BUS_TYPE_IDE, 0, 4, 96, 0, 0, { 0, -1, -1, -1 } },
|
||||
{ "TOSHIBA", "CD-ROM XM-5702B", "TA70", "toshiba_5702b", BUS_TYPE_IDE, 0, 12, 96, 0, 0, { 3, 2, 1, -1 } },
|
||||
{ "TOSHIBA", "CD-ROM XM-6102B", "WA70", "toshiba_6102b", BUS_TYPE_IDE, 0, 24, 96, 0, 0, { 4, 2, 2, -1 } },
|
||||
{ "TOSHIBA", "CD-ROM XM-6202B", "1512", "toshiba_6202b", BUS_TYPE_IDE, 0, 32, 96, 0, 0, { 4, 2, 2, -1 } },
|
||||
{ "TOSHIBA", "CD-ROM XM-6402B", "1008", "toshiba_6402b", BUS_TYPE_IDE, 0, 32, 96, 0, 0, { 4, 2, 2, 2 } },
|
||||
{ "TOSHIBA", "CD-ROM XM-6702B", "1007", "toshiba_6720b", BUS_TYPE_IDE, 0, 48, 96, 0, 0, { 4, 2, 2, 2 } },
|
||||
|
||||
@@ -132,6 +132,7 @@ extern int update_icons;
|
||||
extern int kbd_req_capture;
|
||||
extern int hide_status_bar;
|
||||
extern int hide_tool_bar;
|
||||
extern int fullscreen_ui_visible;
|
||||
|
||||
/* System-related functions. */
|
||||
extern FILE *plat_fopen(const char *path, const char *mode);
|
||||
|
||||
@@ -594,7 +594,7 @@ static const device_config_t ax6bc_config[] = {
|
||||
.files = { "roms/machines/ax6bc/ax6bc110.bin", "" }
|
||||
},
|
||||
{
|
||||
.name = "RM Accelerator 350P2XB/450P3XB (BIOS R2.20)",
|
||||
.name = "Award Modular BIOS v4.60PGMA - Revision R2.20 (RM Accelerator 350P2XB/450P3XB)",
|
||||
.internal_name = "ax6bc_rm",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 1,
|
||||
@@ -603,7 +603,7 @@ static const device_config_t ax6bc_config[] = {
|
||||
.files = { "roms/machines/ax6bc/ax6bc220.bin", "" }
|
||||
},
|
||||
{
|
||||
.name = "Award Modular BIOS v4.60PGM - Revision R2.59",
|
||||
.name = "Award Modular BIOS v4.60PGMA - Revision R2.59",
|
||||
.internal_name = "ax6bc",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 1,
|
||||
@@ -886,6 +886,15 @@ static const device_config_t ms6147_config[] = {
|
||||
.spinner = { 0 },
|
||||
.selection = { { 0 } },
|
||||
.bios = {
|
||||
{
|
||||
.name = "Award Modular BIOS v4.51PG - Revision 1.2 (Fujitsu ErgoPro e368)",
|
||||
.internal_name = "ergoproe368",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 1,
|
||||
.local = 0,
|
||||
.size = 262144,
|
||||
.files = { "roms/machines/ms6147/W647F412.BIN", "" }
|
||||
},
|
||||
{
|
||||
.name = "Award Modular BIOS v4.51PG - Revision 1.8",
|
||||
.internal_name = "ms6147",
|
||||
@@ -913,7 +922,7 @@ static const device_config_t ms6147_config[] = {
|
||||
|
||||
const device_t ms6147_device = {
|
||||
.name = "MSI MS-6147",
|
||||
.internal_name = "ms6147_device",
|
||||
.internal_name = "ms6147",
|
||||
.flags = 0,
|
||||
.local = 0,
|
||||
.init = NULL,
|
||||
|
||||
@@ -1297,7 +1297,7 @@ MainWindow::processKeyboardInput(bool down, uint32_t keycode)
|
||||
case 0x10b: /* Microsoft scroll up normal */
|
||||
case 0x180 ... 0x1ff: /* E0 break codes (including Microsoft scroll down normal) */
|
||||
/* This key uses a break code as make. Send it manually, only on press. */
|
||||
if (down && (mouse_capture || !kbd_req_capture || video_fullscreen)) {
|
||||
if (down && (mouse_capture || !kbd_req_capture || (video_fullscreen && !fullscreen_ui_visible))) {
|
||||
if (keycode & 0x100)
|
||||
keyboard_send(0xe0);
|
||||
keyboard_send(keycode & 0xff);
|
||||
@@ -1464,6 +1464,7 @@ MainWindow::on_actionFullscreen_triggered()
|
||||
if (!hide_tool_bar)
|
||||
ui->toolBar->show();
|
||||
video_fullscreen = 0;
|
||||
fullscreen_ui_visible = 0;
|
||||
if (vid_resize != 1) {
|
||||
emit resizeContents(vid_resize == 2 ? fixed_size_x : monitors[0].mon_scrnsz_x, vid_resize == 2 ? fixed_size_y : monitors[0].mon_scrnsz_y);
|
||||
}
|
||||
@@ -1558,6 +1559,10 @@ MainWindow::eventFilter(QObject *receiver, QEvent *event)
|
||||
|| (QKeySequence) (ke->key() | ke->modifiers()) == FindAcceleratorSeq("mute")) {
|
||||
ui->actionMute_Unmute->trigger();
|
||||
}
|
||||
if ((QKeySequence) (ke->key() | (ke->modifiers() & ~Qt::KeypadModifier)) == FindAcceleratorSeq("toggle_ui_fullscreen")
|
||||
|| (QKeySequence) (ke->key() | ke->modifiers()) == FindAcceleratorSeq("toggle_ui_fullscreen")) {
|
||||
toggleFullscreenUI();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -2206,6 +2211,32 @@ MainWindow::on_actionUpdate_status_bar_icons_triggered()
|
||||
status->clearActivity();
|
||||
}
|
||||
|
||||
void
|
||||
MainWindow::toggleFullscreenUI()
|
||||
{
|
||||
if (video_fullscreen == 0)
|
||||
return;
|
||||
|
||||
fullscreen_ui_visible ^= 1;
|
||||
|
||||
if (fullscreen_ui_visible) {
|
||||
// UI is being shown - save mouse capture state and release if captured
|
||||
mouse_was_captured = (mouse_capture != 0);
|
||||
if (mouse_was_captured) {
|
||||
plat_mouse_capture(0);
|
||||
}
|
||||
} else {
|
||||
// UI is being hidden - restore previous mouse capture state
|
||||
if (mouse_was_captured) {
|
||||
plat_mouse_capture(1);
|
||||
}
|
||||
}
|
||||
|
||||
ui->menubar->setVisible(fullscreen_ui_visible);
|
||||
ui->statusbar->setVisible(fullscreen_ui_visible && !hide_status_bar);
|
||||
ui->toolBar->setVisible(fullscreen_ui_visible && !hide_tool_bar);
|
||||
}
|
||||
|
||||
void
|
||||
MainWindow::on_actionTake_screenshot_triggered()
|
||||
{
|
||||
|
||||
@@ -130,6 +130,7 @@ private slots:
|
||||
void on_actionHide_tool_bar_triggered();
|
||||
void on_actionUpdate_status_bar_icons_triggered();
|
||||
void on_actionTake_screenshot_triggered();
|
||||
void toggleFullscreenUI();
|
||||
void on_actionMute_Unmute_triggered();
|
||||
void on_actionSound_gain_triggered();
|
||||
void on_actionPreferences_triggered();
|
||||
@@ -197,6 +198,9 @@ private:
|
||||
/* Reload the renderers after closing renderer options dialog. */
|
||||
bool reload_renderers = false;
|
||||
|
||||
/* Mouse capture state before showing fullscreen UI */
|
||||
bool mouse_was_captured = false;
|
||||
|
||||
friend class SpecifyDimensions;
|
||||
friend class ProgSettings;
|
||||
friend class RendererCommon;
|
||||
|
||||
Reference in New Issue
Block a user