Merge branch '86Box:master' into master

This commit is contained in:
starfrost
2025-01-06 01:00:02 +00:00
committed by GitHub
4 changed files with 22 additions and 10 deletions

View File

@@ -240,7 +240,6 @@ emu_LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)
lpKdhs->flags &= ~LLKHF_EXTENDED;
} else if (!(lpKdhs->flags & LLKHF_EXTENDED) && (lpKdhs->vkCode == 0x00000013)) {
/* Pause - send E1 1D. */
pclog("Send E1 1D\n");
win_keyboard_handle(0xe1, 0, 0, 0);
win_keyboard_handle(0x1d, LLKHF_UP, 0, 0);
}

View File

@@ -336,16 +336,20 @@ MediaHistoryManager::removeMissingImages(device_index_list_t &device_history)
continue;
}
char temp[MAX_IMAGE_PATH_LEN -1] = { 0 };
char temp[MAX_IMAGE_PATH_LEN * 2] = { 0 };
if (path_abs(checked_path.toUtf8().data())) {
if (checked_path.length() > (MAX_IMAGE_PATH_LEN - 1))
fatal("removeMissingImages(): checked_path.length() > 2047\n");
fatal("removeMissingImages(): checked_path.length() > %i\n", MAX_IMAGE_PATH_LEN - 1);
else
snprintf(temp, (MAX_IMAGE_PATH_LEN - 1), "%s", checked_path.toUtf8().constData());
} else
snprintf(temp, (MAX_IMAGE_PATH_LEN - 1), "%s%s%s", usr_path,
path_get_slash(usr_path), checked_path.toUtf8().constData());
} else {
if ((strlen(usr_path) + strlen(path_get_slash(usr_path)) + checked_path.length()) > (MAX_IMAGE_PATH_LEN - 1))
fatal("removeMissingImages(): Combined absolute path length > %i\n", MAX_IMAGE_PATH_LEN - 1);
else
snprintf(temp, (MAX_IMAGE_PATH_LEN - 1), "%s%s%s", usr_path,
path_get_slash(usr_path), checked_path.toUtf8().constData());
}
path_normalize(temp);
QString qstr = QString::fromUtf8(temp);

View File

@@ -34,6 +34,7 @@
#include <86box/fdd.h>
#include <86box/fdc.h>
#include <86box/sio.h>
#include <86box/plat_fallthrough.h>
typedef struct pc87307_t {
uint8_t id;
@@ -323,8 +324,12 @@ pc87307_write(uint16_t port, uint8_t val, void *priv)
}
break;
case 0x60:
if (dev->regs[0x07] == 0x04) {
val &= 0x03;
}
fallthrough;
case 0x62:
dev->ld_regs[dev->regs[0x07]][dev->cur_reg - 0x30] = val & 0x07;
dev->ld_regs[dev->regs[0x07]][dev->cur_reg - 0x30] = val;
if ((dev->cur_reg == 0x62) && (dev->regs[0x07] != 0x07))
break;
switch (dev->regs[0x07]) {

View File

@@ -423,9 +423,9 @@ es1370_calc_sample_rate(es137x_t *dev)
dev->calc_sample_rate = 5512;
}
dev->calc_sample_rate_synth = 44100 / (1 << ((dev->int_ctrl >> 12) & 3));
dev->interp_factor_synth = 1. / (double) (1 << ((dev->int_ctrl >> 12) & 3));
dev->interp_step_synth = (1 << ((dev->int_ctrl >> 12) & 3));
dev->calc_sample_rate_synth = 44100 / (1 << (((dev->int_ctrl >> 12) & 3) ^ 3));
dev->interp_factor_synth = 1. / (double) ((1 << ((dev->int_ctrl >> 12) & 3) ^ 3));
dev->interp_step_synth = (1 << (((dev->int_ctrl >> 12) & 3) ^ 3));
}
static void
@@ -2828,6 +2828,10 @@ static const device_config_t ct5880_config[] = {
.description = "SigmaTel STAC9721T (stereo)",
.value = AC97_CODEC_STAC9721
},
{
.description = "TriTech TR28023 / Creative CT1297",
.value = AC97_CODEC_TR28023
},
{ .description = "" }
},
.default_int = AC97_CODEC_STAC9708